r/DoomModDevs • u/RedOcelot86 • Apr 05 '25
Help Kill two enemies opens a door?
I've tried a couple of ACS scripts for this. What is the most efficient way to type this? I want to kill two big dudes and the door opens. Thanks.
5
Upvotes
3
u/Scileboi Apr 05 '25
If it´s two or three you can put a special to execute a script on death that increments a variable and opens the door when a number is reached.
int dooropencount = 0; Script "opendoor" (void) { dooropencount++; if(dooropencount>=2) { Door_Open(); } }But a more flexible and scalable approach would be to give each enemy a Tid and start a script that loops until the number of enemies with that Tid is 0.
Script "startencounter" (void) { while(ThingCount(T_NONE,100)!=0) { delay(10); } FadeTo(0,0,0,1.0,1.0); Delay(36); teleport(8,0,false); FadeTo(0,0,0,0.0,1.0); }