spawnbind and anichange

Gurtag

Active member
hey guys, is it posible to conbine the 2 functions in to 1?

like for example  @cmd spawnbind "sroll" 0 0 1 1 6 "ANI_FOLLOW1"

so the entity get binded but you determine the anim to be used from the spawned entity
 
Yes, use this function:
Code:
void spawnbindanim(void Name, float dx, float dy, float dz, int iDir,int iBind, void Ani)
{ // Spawn and bind other entity with desired animation
   void self = getlocalvar("self");
   void Spawn;

   Spawn = spawn01(Name, dx, dy, 0);
   bindentity(Spawn, self, dx, dz, dy, iDir, iBind);
   changeentityproperty(Spawn, "animation", openborconstant(Ani));
}

But beware - depends of which setting you use on bind (like if no animation match, kills the entity), it won't work
 
Back
Top Bottom