Unfortunately my script seems not to work as expected: some zombies are thrusted, some are not.
int NewZombieTid=UniqueTID(); //Unused TID
for(int nSpawn=0;nSpawn<25;;)
{
if(Thing_Spawn(SpotId,"T_ZOMBIE",180*256/360,ZombieTid))
{
ThrustThing(180*256/360,30,0,ZombieTid); //Thrust the just generated zombie in 180 degree direction
ZombieTid=UniqueTID(); //Get another TID
nSpawn++;
}
Hello all,
GZDoom, Doom Builder 2, UDMF map.
I would like to:
1)Spawn a zombie at a map spot
2)Thrust it in a know direction
3)Repeat 25 times
Unfortunately my script seems not to work as expected: some zombies are thrusted, some are not.
int NewZombieTid=UniqueTID(); //Unused TID
for(int nSpawn=0;nSpawn<25;;)
{
if(Thing_Spawn(SpotId,"T_ZOMBIE",180*256/360,ZombieTid))
{
ThrustThing(180*256/360,30,0,ZombieTid); //Thrust the just generated zombie in 180 degree direction
ZombieTid=UniqueTID(); //Get another TID
nSpawn++;
}
delay(70);
}
Any idea?
Thank you!
Share this post
Link to post