I drew a health bar in MS Paint and put it in AGS in a new GUI. How do I make my character lose health now that I have the health bar picture in the GUI?
I'd suggest reading through the sticky in this forum about making RPGs (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=13649.0). It's answered in there, along with lots of other goodies and ideas. Warning though, much of it has old code, until the last few pages. Doesn't mean there's good information there though!
On the last page (12 (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=13649.msg452135#msg452135)), KhrisMUC helps out someone with a similar problem. Read through it, and you can easily adapt it to your use.
~Trent
I don't know how to use GUI's, Globalint's, and I'm not a very good scripter. I only want to make a simple health bar so my character is able to die. I'm sorry for my unacceptable last message, Pumaman.
I guess you'll have to learn how to script then, just like everybody else here did.
You could peruse this and the technical forum - particularly threads marked as solved - to learn about how to approach a scripting problem.
It's difficult to search the forums for a specific problem, but reading through the manual and the forums is a good start. It's what I did.
A quick way of displaying a health bar of variable width is resizing the button used to display the health bar sprite.
Since by default the button's image isn't clipped to the button's size, you'll have to add this to game_start in the global script:
bHealthbar.ClipImage = true;
where bHealthbar is the scriptname of the button.
Then change the width by setting the button's .Width property to another value.
well basicly,when enemy hit, change global variable to -1, then change sprite.... Ahn! I can`t figure out in AGS, but in RPGM 2k3 i was pretty good with events (scripting like, but no codes :D )