Axe Software Forums
  Quest Developer Forum
  health


Author Topic:   health
0 Ste 0 posted 27-02-2003 16:57 GMT     
i know this is the same as gold where you use status variables, but the tutorial/help screen doesnt say how to do this using QDK, it just gives stupid ASL code which i dont have a clue about. so please could somebody be a nice little helper and guide me on how to set the health system up.

I have the status variable right, but i need to know (in QDK) how to make it so when you get attacked your health goes down, and then when you type "look at self" it says "you are slightly wounded" (if you have 3/4 of your health left, if half, then moderatly wounded, if 1%-24%, then mortally wounded). i could probably figure the last part. i just need to know how to take off health when a monster attacks.

0 Ste 0 posted 03-03-2003 12:21 GMT          
ive noticed nobody has posted in 2 days.....
lol, i really need help with this help system, i cant find anything in the tutorial about doing it in QDK, it only shows ASL code which i cant do. lol.
passerby posted 03-03-2003 14:12 GMT          
I'm not familiar with the lastest version of Quest, but to reduce the health (represented by a status variable) you need to subtract whatever amount of health from the status variable, say:

health;%health% - %damage%

where damage is the amount of health removed by whatever is happening (hit with weapon, exhausted, used up casting a spell, etc.)

The other part means that in the 'look' action script, you use an 'if-then-else' statement. You will need to look up what the "greater than" sign is in the ASL programmers guide (I use the ">" symbol here), and then code it like so:

if %health% > 75
msg <You are in peak condition>
else if %health% > 50
msg <You are slightly wounded>
else if %health% > 25
msg <You are moderately wounded>
else
msg <You are severely wounded>

0 Ste 0 posted 03-03-2003 19:56 GMT          
thanks passerby, i dont know wot i would of done without you (concidering nobody else posted) lol. but thanks alot :)
passerby posted 06-03-2003 14:17 GMT          
No problem. Did you get it to work?
0 Ste 0 posted 06-03-2003 15:41 GMT          
almost.... lol, i just need to find out how to get the monster to take some health from you.