Dead Simple like mechanics in UDMF

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Dead Simple like mechanics in UDMF

Postby Korni27 » Tue Feb 02, 2021 5:48 am

I've been wondering if you can create Dead Simple like mechanics, where after killing for example 5 hell knights, the floor will lower. i already know how to make actions happen after picking up or killing a monster, but I was wondering if you can do it with multiple.
User avatar
Korni27
 
Joined: 31 Jan 2021
Location: Poland

Re: Dead Simple like mechanics in UDMF

Postby Jarewill » Tue Feb 02, 2021 7:08 am

You can do it with a script using ThingCount:
Code: Select allExpand view
#include "zcommon.acs"

Script 1 OPEN
{
    While(ThingCountName("HellKnight",0)>0) {Delay(1);}
    //Do stuff once all hell knights are dead
}
Jarewill
 
 
 
Joined: 21 Jul 2019

Re: Dead Simple like mechanics in UDMF

Postby Enjay » Tue Feb 02, 2021 7:18 am

And, just to add to that, if you do it by tid (thing tag), then it doesn't even have to be all hell knights - just the ones that have the specified tag. In fact, the enemies with tag can be of different types too.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland


Return to Mapping

Who is online

Users browsing this forum: No registered users and 0 guests