johnfulgor Posted May 29, 2010 Hello, this acs script is supposed to generate two new monsters with ID=1 around the boss with ID=2 whenever a child monster (ID=1) dies. Unfortunately the result is that always one monster only is generated. It seems that one of the Spawn calls fails. Can someone help me? Thanks! #include "zcommon.acs" script 1 (void) { int PosX = GetActorX (2); int PosY = GetActorY (2); int r=random(0,1); if (r==0) Spawn ("DoomImp", PosX,PosY+40,0,1,0); else if(r==1) Spawn ("ZombieMan", PosX,PosY+40,0,1,0); Spawn ("TeleportFog", PosX,PosY+40,0,0,0); r=random(0,1); if (r==0) Spawn ("DoomImp", PosX,PosY-40,0,1,0); else if(r==1) Spawn ("ZombieMan", PosX,PosY-40,0,1,0); Thing_SetSpecial (1, 80, 1,0,0); ThingSound(2,"lachen",255); Spawn ("TeleportFog", PosX,PosY-40,0,0,0); } 0 Share this post Link to post
johnfulgor Posted May 29, 2010 The coordinates of the monster's position must be expressed in fixed point, and not in the editor coordinates... Thank you anyway! 0 Share this post Link to post