spawnGun/spawnbind4 with caller facing direction

jonsilva

New member
hello
is there a way to set the value in spawnbind4
so that the entity a part from using the same animation has the caller also uses the same direction ?

here the spawnbind4 with same animation
void spawnbind4(void Name, float dx, float dy, float dz, int Dir, int Flag)
{ // Spawn entity and bind it with same animation as caller
  void self = getlocalvar("self");
  void Spawn;

  Spawn = spawn01(Name, dx, dy, dz);
  bindentity(Spawn, self, dx, dz, dy, Dir, Flag);
}

can Dir value be changed so that it changes facing when the caller does ?

here na exemple of the boss entity
boss_enemy.jpg


the problema here is that the tentacles arent facing towards the player when the boss does
 
it works
i though facing Dir would only work in @cmd
but its working whenever the caller faces the player has they fight

just added Dir to spawnGun
void spawnGun7(void Name, float dx, float dy, float dz, int Num, int Dir, void Ani)
{ // Spawn gun with ani animation, store it and bind it + facing + follow
  void self = getlocalvar("self");
  void Spawn;
  Spawn = spawn01(Name, dx, dy, 0);
  setentityvar(self, Num, Spawn); // Stores spawned gun to be killed later
  bindentity(Spawn, self, dx, dz, dy, Dir, 0); // Bind spawned gun
  performattack(Spawn, openborconstant(Ani));
}
 
Back
Top Bottom