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

Share this post


Link to post

if (CheckActorProperty (16, APROP_Health, "Disciple") == 200)
{
then
ACS_Execute (9, 1);
}

I think.

Share this post


Link to post

if (CheckActorProperty (16, APROP_Health, "Disciple") == 200)
{
ACS_Execute (9, 1);
}

now it's perfect :p

Share this post


Link to post
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.

Share this post


Link to post

How about this?


while (ThingCount(T_NONE, 16) > 0)
{
Delay(1);
}
ACS_Execute(9, 1);

Share this post


Link to post

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.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now