Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

ACS monsters generator scripts

Recommended Posts

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?

#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);
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);
Spawn ("TeleportFog", PosX,PosY-40,0,0,0);


Share this post

Link to post

The coordinates of the monster's position must be expressed in fixed point, and not in the editor coordinates...
Thank you anyway!

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now