NoNameIdeas784 Posted April 20, 2023 I am trying to make it so when all monsters in a room are killed, an event is activated (monster spawn, door open, lift activates) etc how can i do that ? 0 Quote Share this post Link to post
SOF2Fragger Posted April 20, 2023 script 1 ENTER { while (ThingCount(T_NONE, TID) > 0) Delay(35); Door_Open(1, 16, 0); //EVENT TRIGGERED BY KILLING ALL MONSTERS WITH THAT TID } 0 Quote Share this post Link to post
NoNameIdeas784 Posted April 20, 2023 4 hours ago, SOF2Fragger said: script 1 ENTER { while (ThingCount(T_NONE, TID) > 0) Delay(35); Door_Open(1, 16, 0); //EVENT TRIGGERED BY KILLING ALL MONSTERS WITH THAT TID } do i need to put all of the monsters tag to 16 ? 1 Quote Share this post Link to post
SOF2Fragger Posted April 20, 2023 21 minutes ago, NoNameIdeas784 said: do i need to put all of the monsters tag to 16 ? You can use any available TID for the monsters. The 16 in the sample is for the action after killing them. You can also use any action, not just the one I used, which does nothing. 0 Quote Share this post Link to post
NoNameIdeas784 Posted April 21, 2023 17 hours ago, SOF2Fragger said: script 1 ENTER { while (ThingCount(T_NONE, TID) > 0) Delay(35); Door_Open(1, 16, 0); //EVENT TRIGGERED BY KILLING ALL MONSTERS WITH THAT TID } i tested it, script has error i cant compile it 0 Quote Share this post Link to post
ramon.dexter Posted April 21, 2023 (edited) And the error says? Pasting what the error says is quite essential for helping you... Edited April 21, 2023 by ramon.dexter 0 Quote Share this post Link to post
SOF2Fragger Posted April 21, 2023 6 hours ago, NoNameIdeas784 said: i tested it, script has error i cant compile it https://www.doomworld.com/forum/topic/117730-basic-helpfull-scripts/ 0 Quote Share this post Link to post
magicsofa Posted April 21, 2023 7 hours ago, NoNameIdeas784 said: i tested it, script has error i cant compile it Because it is Wrong with a capital W script 1 ENTER { while (ThingCount(T_NONE, 2) > 0) Delay(35); Door_Open(1, 16, 0); } Take note of what the script is actually doing: It counts the number of things with the type T_NONE (so any Thing), and with TID = 2. If it counts at least 1 of those, then it will wait 1 second (35 tics) and count again. Once it hits a count of 0, it stops performing the stuff inside the "while" loop (delay) and moves on to the next line, Door_Open. 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.