Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Cyberdemon531

How would I create a script for killing multiple monsters..

Recommended Posts

Say, I have a Baron, three Imps and a Demon in a room. I want to make it so when they all are killed, a door will open leading to the next room. Is that possible?

Share this post


Link to post

Alright here's a problem.
I have a room, when you press the switch, three doors behind you close, in a cool effect, and Imps start to teleport to where you are. I want it, so when all the teleported Imps are killed, the doors open up again.
Here's my script.

script 3 OPEN
{
While (ThingCount(T_NONE, 10) > 7)
Delay(35);

Door_Open (7, 55);
Delay(20);
Door_open(6, 55);
Delay(20);
Door_open(5, 55);
}

I gave all the Imps tag 10. (The tag is TID, right? )

Share this post


Link to post

While (ThingCount(T_NONE, 10) > 7) Delay(35);

What code waits while the thing count is bigger than 7. If it goes lower (i.e. 0 to 6) it will not wait anymore. To wait until there are no things with that tag you have to use

While (ThingCount(T_NONE, 10) > 0) Delay(35);

Share this post


Link to post
Kappes Buur said:

Uhh... I don't have them spawning. I have them in a room, when the switch is pressed, activates a script. It does this.

script 2 (void)
{
door_close(5, 55); >>> Closes the door; blocking player in the room.
delay(20);
door_close(6, 55); >>> Same but made 3 doors to look cool.
delay(20);
door_close(7, 55); >>> Same
delay(20);
Door_open(8, 64); >>> Opens door in room with Imps, to let them go through the teleporter and attack the player. They have a tag of 10, and there are 7 of them.
}

Here's the after-killed-script I made.

script 3 OPEN
{
While (ThingCount(T_NONE, 10) > 0) Delay(35); >>> This part is confusing. :S

Door_Open (7, 55); >>> To re-open doors allowing player to exit the room.
Delay(20);
Door_open(6, 55);
Delay(20);
Door_open(5, 55);
}

Share this post


Link to post

Could/would you show a screenshot of the map layout and/or attach a link to the map.

For example, the map layout of my example map:

Share this post


Link to post

Got it. I figured it out. No offense, but your examples didn't help me. I just had the doors right next to each other so they couldn't open.

Thanks anyway!!! :D

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
Sign in to follow this  
×