Godsdoomer Posted May 2, 2013 Hi again, I am trying to make a script that checks the health of 4 different monsters. If the health is 0, then it will execute the next script. It doesn't seem to be working though, and I'm not sure if ACS supports the "then" expression. Here is my code so far: if (CheckActorProperty (16, APROP_Health, "Disciple") = 200) { then ACS_Execute (9, 1); } Is it something obvious or am I just completely off the mark? aha 0 Share this post Link to post
Krispy Posted May 2, 2013 if (CheckActorProperty (16, APROP_Health, "Disciple") == 200) { then ACS_Execute (9, 1); } I think. 0 Share this post Link to post
Memfis Posted May 2, 2013 if (CheckActorProperty (16, APROP_Health, "Disciple") == 200) { ACS_Execute (9, 1); } now it's perfect :p 0 Share this post Link to post
gggmork Posted May 2, 2013 Godsdoomer said:If the health is 0 I'm pretty sure monster health often goes negative when you kill it, so maybe check <=0, or print it to see how it behaves. 0 Share this post Link to post
Archi Posted May 3, 2013 Use this: http://zdoom.org/wiki/ThingCount Also, look at other scripts in other wads. 0 Share this post Link to post
Cat God25 Posted May 3, 2013 How about this? while (ThingCount(T_NONE, 16) > 0) { Delay(1); } ACS_Execute(9, 1); 0 Share this post Link to post
Godsdoomer Posted May 4, 2013 Thanks for the help everyone. I really appreciate the support here on the forums. Archi and Cat; I dident even know about ThingCount, which is an a lot easier way to do the sort of thing I'm attempting. I rewrote my script in a manner that's similar to the one you posted cat, Thanks a ton man. 0 Share this post Link to post