Guest DILDOMASTER666 Posted August 28, 2008 Use this to group a number of objects with Thing ID #200, and keep track of how many are active. To change the ThingID that is kept track of, change the line "#define SPECIALTHING 200". Assign action 80 with Script #900 to each Thing with the ID you are keeping track of. #include "zcommon.acs" #define SPECIALTHING 200 int SpecialCount; Script 255 (void) { if(!ThingCount(0,SPECIALTHING)) { //Add your scripted events for when there are no more SpecialThings left } } Script 900 OPEN { SpecialCount=ThingCount(0,SPECIALTHING); } Alternatively, if you wish to count how many of a certain thing are currently alive, you may do the following. For each Thing with the ID you wish to keep track of, simply assign Action #80 with Script #255. It will activate when the Thing becomes "dead". You should change the print() statement in Script 255 to a HudMessage command instead for a better effect.#include "zcommon.acs" #define SPECIALTHING 200 int ThingsCounted=ThingCount(0,SPECIALTHING); Script 255 (void) { if(!ThingCount(0,SPECIALTHING)) { //Add your scripted events for when there are no more SpecialThings left } } Script 900 OPEN { Print(d:ThingsCounted-ThingCount(0,SPECIALTHING,s:"Things killed."); Delay(5); Restart; } 0 Share this post Link to post
Guest DILDOMASTER666 Posted August 30, 2008 If you want it to be global to all maps, you can do the following: 1. Compile this script by itself 2. Import the .o file into your WAD between A_START and A_END markers 3. Add a text lump named "LOADACS" and add the name of the imported script by itself Then you just label all the things you want to be counted with ID 200 (or whatever you choose). 0 Share this post Link to post
Xerenogan Posted August 27, 2020 I know that this thread is very old, but to anyone who is searching for something akin to what the OP was looking for, I found something that could scratch that itch in a manner of speaking. WarTrophies 0 Share this post Link to post