Health
ramtha
05 Jun 2006, 17:57Is there any way that the players health can't exceed a certain number. Say if you have a total of 150 health and you are at 100 and when you use a potion you gain back 75 health.... could you make it so the health afterwards would stop at 150 instead of being 175/150
Cryophile
05 Jun 2006, 21:53Here's an example if the current health is a variable and the max health is a property:
if (%currenthealth% > $Objectproperty(objectname;health)$) { set <health; $objectproperty(objectname;health)$> }
paul_one
06 Jun 2006, 07:57There are also things called status variables - which will automatically kick this type of script off - if you put it in the right place...
Cryophile
06 Jun 2006, 20:16Hmm, if it's the player's health that makes sense. I usually have to keep track of a few dozen at least so that's not too useful.
paul_one
07 Jun 2006, 08:40Yeah, an enemies health should be checked after every 'turn', which damages the enemy.