Reaper Grimm
User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > More script help
 
Author
All times are GMT. The time now is 20:57. Post New Thread    Post A Reply
Godsdoomer
Green Marine


Posts: 46
Registered: 08-11


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

Old Post May 2 2013 19:39 #
Godsdoomer is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Krispy
Senior Member


Posts: 1255
Registered: 02-12


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

I think.

Old Post May 2 2013 20:17 #
Krispy is offline Youtube || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Memfis
Honestly, semen doesn't taste that bad.


Posts: 7014
Registered: 04-07


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

now it's perfect :p

Old Post May 2 2013 21:11 #
Memfis is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
gggmork
If you can make any sense of this post, congratulations


Posts: 2862
Registered: 06-07



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.

Old Post May 2 2013 22:06 #
gggmork is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Archi
Member


Posts: 429
Registered: 07-09


Use this: http://zdoom.org/wiki/ThingCount

Also, look at other scripts in other wads.

Last edited by Archi on May 3 2013 at 06:28

Old Post May 3 2013 06:19 #
Archi is offline Twitch || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Cat God25
Mini-Member


Posts: 55
Registered: 04-09


How about this?


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

Old Post May 3 2013 15:06 #
Cat God25 is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Godsdoomer
Green Marine


Posts: 46
Registered: 08-11


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.

Old Post May 4 2013 05:43 #
Godsdoomer is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 20:57. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > More script help

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.