Health GUI.(Solved)

Started by Swordwielder, Mon 16/02/2009 22:34:38

Previous topic - Next topic

Swordwielder

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?

Trent R

#1
I'd suggest reading through the sticky in this forum about making RPGs. 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), KhrisMUC helps out someone with a similar problem. Read through it, and you can easily adapt it to your use.



~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

Swordwielder

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.

Khris

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:
Code: ags
  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.

Jakerpot

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 )



SMF spam blocked by CleanTalk