[Solved]Spawnbind Question

I use spawnbind for certain attacks for characters and when the enemy is hit or knocked down the spawned entity will still play sometimes at the spawned height and sometimes it will stay bound to the summoning entity, how do I set it to remove itself if the entity is hit or knocked down and can I control it's facing direction if the entity changes its facing direction?
 
Code:
void spawnbind2(void Name, float dx, float dy, float dz, int iDir,int iBind)
{// Bind entity to target, so the target moves, the entity moves.
 // @cmd spawnbind2 "entity" x z a direction bindanimation
 // [Direction]
 //  0 = No change. 
 //  1 = Same direction as target. 
 // -1 = Opposite direction as target. 
 //  2 = Always right.
 // -2 = Always left.
 // [Bindanimation] 
 //  0 = No effect. 
 //  1 = Keep same animation as the target. 
 //  2 = Also keep same frame as the target. 
 //  4 = Kill the entity if the animation doesn't match.
 // You can combine those values for bindanimation, so it can be 6 which means 2 and 4.

   void self = getlocalvar("self");
   void Spawn;

   Spawn = spawn01(Name, dx, dy, 0);
   bindentity(Spawn, self, dx, dz, dy, iDir, iBind);
} 

Use bindanimation option 4. Make sure the bound entity's animation is the same name.
 
I'm confused about the spawn part of the script at the bottom

I call the function like this but the entity doesn't spawn and I don't understand how to implement the spawn part of it can you give an example?
Code:
@cmd spawnbind2 "Gflame" 30 50 0 1 4
 
There are 2 reasons why it didn't spawn:
1. Gflame isn't loaded yet prior to spawning
2. Gflame doesn't have animation with same name as spawner's animation

#2 means say the spawner spawns Gflame in ATTACK1 animation then Gflame MUST have ATTACK1 animation too

Why don't you show us the whole animation where you declared that function?
 
Didn't get a chance to get on the pc today so i couldn't show the characters text but from what i gather it was missing the anim and the animation should be freespecial since its being spawned in a freespecial correct?
 
Viper Snake said:
void spawnbind2(void Name, float dx, float dy, float dz, int iDir,int iBind)
{// Bind entity to target, so the target moves, the entity moves.
// @cmd spawnbind2 "entity" x z a direction bindanimation
// [Direction]
//  0 = No change.
//  1 = Same direction as target.
// -1 = Opposite direction as target.
//  2 = Always right.
// -2 = Always left.
// [Bindanimation]
//  0 = No effect.
//  1 = Keep same animation as the target.
//  2 = Also keep same frame as the target.
//  4 = Kill the entity if the animation doesn't match.
// You can combine those values for bindanimation, so it can be 6 which means 2 and 4.

  void self = getlocalvar("self");
  void Spawn;

  Spawn = spawn01(Name, dx, dy, 0);
  bindentity(Spawn, self, dx, dz, dy, iDir, iBind);
} 


Use bindanimation option 4. Make sure the bound entity's animation is the same name.

this is driving me crazy where is the background code behind the iBind part of this script ??
 
Back
Top Bottom