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

Arena fights in UDMF?

Recommended Posts

I want to make a generic arena fight. Player walks in and doors close and lock. The doors won't open until all monsters in the room are dead. How do I do this?

Thank you.

Share this post


Link to post

Give a specific TID to all monsters in the arena. Set their Action (automatically activated upon death) to ACS_Execute to execute a script that would count alive monsters with this given TID (use ThingCount or ThingCountName for this), and if it counted zero (=all dead), it would do whatever you need to unlock the arena.

Share this post


Link to post

Thanks. Now I'm going to prove myself to be the great noob I am by asking this follow-up question:

How exactly do I do this? And what is TID?

Share this post


Link to post

TID is Thing ID, basically a tag that you can give to individual Things in a map.

Scripts are being written into the SCRIPTS window. The script for your task would look something along these lines:

#include "zcommon.acs"

script 1 (void) {
    if(ThingCount(T_NONE,5)==0) { // Counts all living monsters whose TID is 5, the condition will be true if there are zero of them
        // Put your actions to unlock the arena here
    }
}
Then give each of your monsters a TID 5 and an action ACS_Execute with the first parameter 1, because the script number is 1.

More info here:
http://zdoom.org/wiki/ACS
http://zdoom.org/wiki/Structure_of_a_script
http://zdoom.org/wiki/Script_types
http://zdoom.org/wiki/ThingCount
http://zdoom.org/wiki/ACS_Execute
And finally: http://zdoom.org/wiki/Built-in_ACS_functions and http://zdoom.org/wiki/Action_specials

Share this post


Link to post

Thanks Scifista42!

But now I'm going to prove myself to be a bigger noob than |I originally appeared to be (which by itself is pretty big) by requesting you to write the full script (like you did in an earlier post) cause I couldn't understand the examples in the Zdoom wiki.

...

Thanks...?

Share this post


Link to post

If you want to write ACS scripts at all, there is no good in completely shutting your mind away from understanding them and always letting someone else to do whatever you need for you.

If you don't understand something moderately easy, just take a step back, start from the very basics, and gradually continue learning at your own pace.

Start here: http://zdoom.org/wiki/A_quick_beginner%27s_guide_to_ACS

Then tuturials from here: http://zdoom.org/wiki/ACS#ACS_tutorial (up to Built-in ACS functions)

Share this post


Link to post

In vanilla, you can tweak a certain monster type in DEHACKED to call KeenDie function upon its death, which will open a door tagged 666 if all monsters of the same species as the calling monster are already dead.

Or you can use my trick - it needs special map design, but works. :)

Share this post


Link to post

I tried to change TID of all the monsters in my arena but there's a problem.

Though my understanding of ACS have gotten slightly gotten better, it's still pretty bad. To change TID of anything I need to know the old TID right?

Well I have multiple monsters in my arena and some of them are custom monsters I got from Realm667. They are the ST Dark Imp and A Blood Demon. How do I change TID of multiple monsters and custom monsters?

Share this post


Link to post

You set thing's TID (tag) directly in the mapping editor. The same way as you set tags to linedefs and sectors. Go to the thing's properties and put a number into the tag field.

Share this post


Link to post
scifista42 said:

In vanilla, you can tweak a certain monster type in DEHACKED to call KeenDie function upon its death, which will open a door tagged 666 if all monsters of the same species as the calling monster are already dead.


Ok, I was thinking Vanilla without dehacked modifications.

Share this post


Link to post
scifista42 said:

You set thing's TID (tag) directly in the mapping editor. The same way as you set tags to linedefs and sectors. Go to the thing's properties and put a number into the tag field.


Ulp! I assumed TID and tags were two different things.

Share this post


Link to post
scifista42 said:

My trick (mentioned in the same post) works without DEHACKED modifications. :)


I read it but didn't understand. I will have to read it more carefully. Maybe it's better if you post an example wad with it?

Share this post


Link to post

The trick is used in my MAP19 of D2INO, on 3 separate places: The first bridge with HKs and Barons, the red key fight with Arachnotrons, and the final arena with Cyberdemon.

Share this post


Link to post

Well... I was finally able to get the desired effect after some slight trial and error.

Thanks for your help.

Share this post


Link to post
Guest
This topic is now closed to further replies.
×