Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Tue 23/08/2005 16:43:41

Title: health- displaying on gui and reducing\increasing
Post by: on Tue 23/08/2005 16:43:41
i was wandering how i should make a basic health GUI displayed as a number, which can increase or decrease depending on certain actions, i would also like to know how i can reduce or increase the health, and how it should be wrote in the script.  ???
Title: Re: health- displaying on gui and reducing\increasing
Post by: strazer on Tue 23/08/2005 17:35:24
You can, for example, use a GlobalInt to keep track of the health and use a label to display this GlobalInt's value on the screen.
Put a label on a GUI, set the GUI's visibility to "Normal" and set the label's text to "@GIx@" where x is the number of the GlobalInt, between 0 and 499.
To increase/decrease the health, simply change the GlobalInt's value using the SetGlobalInt function.

Also, try a forum search next time:

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=19539
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=21835
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=12074
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=13073
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=12549