DooMBoy Posted December 3, 2002 Alright, I'm doing another level that I'm going to call The Stronghold. It replaces map26, if anyone cares, which I'm sure you don't :p To cut to the chase, there's a lot of enemies in this map, and the actual stronghold itself lies behind a raised wall. The thing is, I want this wall to lower to the ground once all of the enemies are dead, not just a certain type (like Mancubi or Arachnotrons). If anyone knows how to do this, please tell me. I will greatly appreciate it :) 0 Share this post Link to post
boris Posted December 3, 2002 Give all the enemies the same TID and use this TID as the second argument for Thing_Count, leaving the first argument out, like (if your TID is 123) Thing_Count(0, 123); 0 Share this post Link to post
Enjay Posted December 3, 2002 This should work... give all the enemies a tid, and then use thingcount. You are probably used to using thingcount like this: ThingCount(T_BARON, 0); where you identify the thing to be counted by type. The second parameter, however is for the tid. I think: ThingCount(T_BARON, 1); Would only count Barons with a tid of 1, and ignore the others, whereas: ThingCount (0, 1); Would count anything with a tid of 1. Edit: OK, so I had this sitting open in my browser for a while before answering and Tarin got in before me! 0 Share this post Link to post
DooMBoy Posted December 3, 2002 OK, I've given all the enemies in my map the tid of 1. Here is the script itself: script 2 (void) { ThingCount (0, 1); Floor_LowerToNearest (5, 60); } Now, for whatever reason, when I kill all the enemies, the wall doesn't lower, and so the level can't go on. I made sure the wall had the tag of 5 (script?) just to be sure. It doesn't work, though. What's up with that? 0 Share this post Link to post
boris Posted December 3, 2002 DooMBoy said:script 2 (void) { ThingCount (0, 1); Floor_LowerToNearest (5, 60); } Well, when does this script get executed? Change it to this and it should work: script 2 open { if(ThingCount (0, 1) == 0) { Floor_LowerToNearest (5, 60); } else { delay(1); // important! restart; } } 0 Share this post Link to post
The Ultimate DooMer Posted December 3, 2002 This setup works for me: (all relevant monsters have tag 33, floor has tag 34) script 2 OPEN { print(s:"you need to kill everything before the wall lowers"); while (thingcount (0, 33)) { delay(35); } Floor_LowerToLowest (34, 32); print(s:"a wall has lowered."); } 0 Share this post Link to post