Pure Hellspawn Posted July 21, 2005 I am having problems scripting an event when three different kinds of monsters die. These monsters are a CyberMastermind, a Cyberdemon, and a LordofHeresy. I do not know how to script an event which checks to see if each is dead. I also do not know the thing ID's. 0 Share this post Link to post
Giest118 Posted July 21, 2005 First of all, give them all the same TID (Thing ID). Then, use this script (using 1 as the TID for this example) Script 1 OPEN { while(thingcount(0,1) > 0) { Delay(35); } [whatever the event is goes here] } 0 Share this post Link to post
Negatronica Posted July 21, 2005 I didn't know how the thingcount worked so I did this: #include "zcommon.acs" int var = 3; Script 1 (void) { var = var - 1; if (var == 0) { Door_Open(1,64); } } Each monster you kill will execute the script once, there might be better ways of doing this but this one worked for me. 0 Share this post Link to post
Giest118 Posted July 21, 2005 Shtbag667 said: I didn't know how the thingcount worked so I did this: #include "zcommon.acs" int var = 3; Script 1 (void) { var = var - 1; if (var == 0) { Door_Open(1,64); } } Alternatively... Replace "var = var - 1;" with "var-=1;". 0 Share this post Link to post
Pure Hellspawn Posted July 21, 2005 Shtbag667 said:I didn't know how the thingcount worked so I did this: #include "zcommon.acs" int var = 3; Script 1 (void) { var = var - 1; if (var == 0) { Door_Open(1,64); } } Each monster you kill will execute the script once, there might be better ways of doing this but this one worked for me. You solved the problem. Thanks a ton. 0 Share this post Link to post