Jump to content

Photo

ghost.zh


  • Please log in to reply
645 replies to this topic

#61 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 17 August 2011 - 01:33 PM

So saffith do you think you'll be able to give us a better function to reproduce moldorm movement? Me and Colossal need it for a project we're working on together.

Edited by blackbishop89, 17 August 2011 - 01:33 PM.


#62 SpacemanDan

SpacemanDan

  • Members
  • Location:Ontario, Canada

Posted 17 August 2011 - 05:25 PM

Many thanks for the help Saffith. I just rewrote the thing (wasn't hard. XD) but I ran into another minor problem.

CODE
const int SLM_BALL = 88;  //The slime projectile that shoots to create more slimes.
const int SLM_COMBO = 3820; //Slime combo
const int SLM_SOUND = 0; //Sound when the slime shoots a smaller slime
const int SLM_ZOL = 180; //ID of the Zol to spawn
const int SLM_EXPLODE = 0; //Sound when slime explodes
const int SLM_ENEMYID = 183; //ID of enemy to use for ghosted enemy

ffc script slimeBoss{
    void run(){
        npc ghost = Ghost_InitWait(this,1,true);
        int frames;
        int angleRand;
        eweapon wpn;
        while(true){
            frames++;
            if(frames%120 == 0){
                angleRand = Rand(360);
                wpn = FireAimedEWeapon(EW_SCRIPT1,CenterX(this),CenterY(this),DegtoRad(angleRand),50,4,SLM_BALL,SLM_SOUND,EWF_SHADOW);
                SetEWeaponMovement(wpn,EWM_THROW,Rand(25,60)/10);
                SetEWeaponDeathEffect(wpn,EWD_VANISH,0);
                
                wpn = FireAimedEWeapon(EW_SCRIPT1,CenterX(this),CenterY(this),DegtoRad(angleRand+45),50,4,SLM_BALL,SLM_SOUND,EWF_SHADOW);
                SetEWeaponMovement(wpn,EWM_THROW,Rand(25,60)/10);
                SetEWeaponDeathEffect(wpn,EWD_VANISH,0);
                
                wpn = FireAimedEWeapon(EW_SCRIPT1,CenterX(this),CenterY(this),DegtoRad(angleRand-45),50,4,SLM_BALL,SLM_SOUND,EWF_SHADOW);
                SetEWeaponMovement(wpn,EWM_THROW,Rand(25,60)/10);
                SetEWeaponDeathEffect(wpn,EWD_VANISH,0);
            }
            slimeWaitFrame(this,ghost);            
        }        
    }
    
    void slimeWaitFrame(ffc this, npc ghost){
        eweapon wpn;
        Ghost_Waitframe2(this,ghost,true,true);
        this->X = ghost->X;
        this->Y = ghost->Y;
        if(Ghost_GotHit()){            
            wpn = FireAimedEWeapon(EW_SCRIPT1,CenterX(this),CenterY(this),0,50,4,SLM_BALL,SLM_SOUND,EWF_SHADOW);
            SetEWeaponMovement(wpn,EWM_THROW,Rand(25,60)/10);
            SetEWeaponDeathEffect(wpn,EWD_SPAWN_NPC,SLM_ZOL);
            if(Ghost_HP < 100){
                Ghost_Explode(this,ghost);
            }
        }        
    }
}


The problem I'm having is that the FFC will not stick to the enemy like I was intending. So, to temporarily remedy this, I just forcefully put the FFC there, but I'm not sure if this could potentially break things. It's probably something I overlooked.. DX Any advice?

#63 Saffith

Saffith

    IPv7 user

  • Members

Posted 17 August 2011 - 11:18 PM

QUOTE(blackbishop89 @ Aug 17 2011, 02:33 PM) View Post

So saffith do you think you'll be able to give us a better function to reproduce moldorm movement? Me and Colossal need it for a project we're working on together.

I don't know. It depends on whether I can find the code for it and whether it's something that can be duplicated reasonably well. I suspect it's actually another canmove restriction; maybe I can think of a way to imitate that.


QUOTE(SpacemanDan @ Aug 17 2011, 06:25 PM) View Post
The problem I'm having is that the FFC will not stick to the enemy like I was intending. So, to temporarily remedy this, I just forcefully put the FFC there, but I'm not sure if this could potentially break things. It's probably something I overlooked.. DX Any advice?

Another bug. I hate missing things that simple... icon_razz.gif Should be fixed now.

#64 SpacemanDan

SpacemanDan

  • Members
  • Location:Ontario, Canada

Posted 17 August 2011 - 11:28 PM

Gah, I'm sorry for not catching that one myself. DX Thanks for the fix though. icon_smile.gif

#65 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 18 August 2011 - 10:12 PM

I think you might of over looked something Saffith. I just had to Graphically extend an enemy myself because ghost.zh only extends the the hitbox not both like it should in my opinion. Was that your intention or was it overlooked as I said.

Another thing, the homing for 8 way enemies seems to be only 4 way. While built in homing is 8 way for 8 way enemies. Just though I should bring that up.

Edited by blackbishop89, 19 August 2011 - 09:16 AM.


#66 Saffith

Saffith

    IPv7 user

  • Members

Posted 19 August 2011 - 09:24 AM

QUOTE(blackbishop89 @ Aug 18 2011, 11:12 PM) View Post
I think you might of over looked something Saffith. I just had to Graphically extend an enemy myself because ghost.zh only extends the the hitbox not both like it should in my opinion. Was that your intention or was it overlooked as I said.

That depends. How were you trying to extend it at first?

QUOTE
Another thing, the homing for 8 way enemies seems to be only 4 way. While built in homing is 8 way for 8 way enemies. Just though I should bring that up.

Yeah, they're kind of weird, but I just copied the built-in functions. They do some odd things sometimes.

#67 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 19 August 2011 - 09:26 AM

QUOTE(Saffith @ Aug 19 2011, 08:24 AM) View Post

That depends. How were you trying to extend it at first?
Yeah, they're kind of weird, but I just copied the built-in functions. They do some odd things sometimes.


Just good old Ghost_TileWidth and Ghost_TileHeight. Also tried Ghost_Transform, neither worked.

#68 Saffith

Saffith

    IPv7 user

  • Members

Posted 19 August 2011 - 09:31 AM

Resizing the FFC is the primary purpose of those. It's the hitbox resizing that's secondary, but they should do that, too. Can you give me an example where they're failing?

#69 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 19 August 2011 - 07:43 PM

QUOTE(Saffith @ Aug 19 2011, 08:31 AM) View Post

Resizing the FFC is the primary purpose of those. It's the hitbox resizing that's secondary, but they should do that, too. Can you give me an example where they're failing?


Like I said, when you use the default enemy graphic from the enemy editor and not a ffc's. In my case it's when I set Attribute 11 to 1. which is my Ghost Invisible Combo. It still extends the ffc though, just not the enemy.

EDIT: Also off topic but for the throw eweapon movements my weapons don't have shadows was there something I missed during setup?

EWF_SHADOW: The weapon will cast a shadow if it's Z is greater than 0.

EDIT: 2 Hey saffith, I know this makes me sound stupid but just what is the difference between ConstantWalk and VariableWalk?

EDIT 3: I have a suggestion why not make it so that the enemy graphic is visible while the enemy explodes. May'be store it during Ghost_Waitframe and call it when they explode. This is mainly for enemies where you want to use the graphics from the built in enemy editor and not the combos.

EDIT 4: Another one, when using the built in graphics and not the combo ghost->Dir is not being set. It should.

EDIT 5: It seems that if I use ghostwait frame light and the functions in ghost.txt that are said to be used internally he appears like normal when exploding. So no problems there!

Edited by blackbishop89, 19 August 2011 - 08:04 PM.


#70 Saffith

Saffith

    IPv7 user

  • Members

Posted 19 August 2011 - 08:28 PM

QUOTE(blackbishop89 @ Aug 19 2011, 08:43 PM) View Post
Like I said, when you use the default enemy graphic from the enemy editor and not a ffc's. In my case it's when I set Attribute 11 to 1. which is my Ghost Invisible Combo. It still extends the ffc though, just not the enemy.

Okay, I see. I'll fix that.

QUOTE
EDIT: 2 Hey saffith, I know this makes me sound stupid but just what is the difference between ConstantWalk and VariableWalk?

Constant walk keeps the enemy aligned to the 8x8 grid.

QUOTE
EDIT 3: I have a suggestion why not make it so that the enemy graphic is visible while the enemy explodes. May'be store it during Ghost_Waitframe and call it when they explode. This is mainly for enemies where you want to use the graphics from the built in enemy editor and not the combos.

Eh? There's no reason it shouldn't be visible either way. Can you show me how you're using it?

QUOTE
EDIT 4: Another one, when using the built in graphics and not the combo ghost->Dir is not being set. It should.

Okay, sure.

#71 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 19 August 2011 - 08:31 PM

QUOTE(Saffith @ Aug 19 2011, 07:28 PM) View Post

Eh? There's no reason it shouldn't be visible either way. Can you show me how you're using it?


Sure I'll PM you a test quest asap. icon_wink.gif


#72 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 20 August 2011 - 10:34 PM

Another bug. Ghost_Explode doesn't incorporate the Draw*Offsets. Can you fix this?

#73 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 21 August 2011 - 07:31 PM

Is drift suppose to ignore normal movement?

Edited by blackbishop89, 21 August 2011 - 07:32 PM.


#74 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 25 August 2011 - 02:09 PM

Another problem with constantwalk4. It seems the enemies position is being snapped to the grid both directions. It should only be snapped to the grid on the axis it's NOT moving.

#75 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 25 August 2011 - 04:14 PM

Is there some sort of tutorial for Ghost.zh and AutoGhost yet? I know where all of the variables and functions are, but I'm not sure how to put it all together, even for a basic script such as creating 2x2 stalfos.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users