Cyberdemon
Register | 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 00:07. 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 05-02-13 19:39 #
Godsdoomer is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
Krispy
Senior Member


Posts: 1196
Registered: 02-12


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

I think.

Old Post 05-02-13 20:17 #
Krispy is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Memfis
Forum Spammer


Posts: 5892
Registered: 04-07


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

now it's perfect :p

Old Post 05-02-13 21:11 #
Memfis is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
gggmork
If you can make any sense of this post, congratulations


Posts: 2842
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 05-02-13 22:06 #
gggmork is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Archi
Member


Posts: 307
Registered: 07-09


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

Also, look at other scripts in other wads.

Last edited by Archi on 05-03-13 at 06:28

Old Post 05-03-13 06:19 #
Archi is offline Profile || Blog || PM || Search || 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 05-03-13 15:06 #
Cat God25 is offline Profile || Blog || PM || Search || 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 05-04-13 05:43 #
Godsdoomer is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 00:07. 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.