Displaying health in gui

Started by Rd27, Wed 21/03/2007 19:47:14

Previous topic - Next topic

Rd27

I would like to make a healthpoint system in my game, which would display health in a gui.
Like setting in the game_start script: Set globalint(1,10);
Then there should be gui, what is showing Health: 10/10.

How would I do this???

I have made many many searches, tried to look tutorials and I have founded numerous topics and few tutorials, but I just haven't got it work ???.

All the help are welcome  :).

Khris

#1
Put a label on the GUI, set its Scriptname to e.g. "lblHealth".

Then put this in the rep_ex:
Code: ags
  lblHealth.Text=String.Format("%d/10", GetGlobalInt(1));


If this doesn't solve it, PLEASE tell us exactly what does or doesn't happen and what you've tried so far.

Edit by Ashen: For attitude

Rd27

That worked perfectly!

Thanks a lot  :)!

SMF spam blocked by CleanTalk