Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Nixxon on Thu 01/05/2003 15:56:48

Title: Displaying score in GUI
Post by: Nixxon on Thu 01/05/2003 15:56:48
Was wondering if i could display the players score in an "always on" lucus style GUI. I'm assuming it has somthing to do with a list box... appreciate the help :)
Title: Re:Displaying score in GUI
Post by: RickJ on Thu 01/05/2003 16:03:02
Use a label and put the following text in the label @SCORE@.  @SCORE@ will be replaced with the players scor when you run the game.
Title: Re:Displaying score in GUI
Post by: x0z on Thu 01/05/2003 16:05:06
QuoteInterface text
You can easily display static text on interfaces. For example, the Sierra-style interface displays the score in the status bar.
To add text to a GUI, you add a label. Click the "Add label" button, then drag out a rectangle like you did when adding a button. You can change the text displayed in the label by editing the "Text" property. Notice that the text automatically wraps round to fit inside the rectangle you drew.

As well as typing normal text into the label, you can add some special markers which allow the text to change during the game. The following tokens will be replaced with the relevant values in the game:

@GAMENAME@    The game's name, specified on the Game Settings pane
@OVERHOTSPOT@ Name of the hotspot which the cursor is over
@SCORE@       The player's current score
@SCORETEXT@   The text "Score: X of XX" with the relevant numbers filled in.
@TOTALSCORE@  The maximum possible score, specified on the Game Settings pane

Example: You have @SCORE@ out of @TOTALSCORE@ points.
The Properties window also allows you to align the text to left, right or centre, as well as change its font and colour.

It's from AGS help-file-... 8)

EDIT: RickJ was faster!
;D
Title: Re:Displaying score in GUI
Post by: Nixxon on Thu 01/05/2003 16:05:22
You Beauty! :D thanks for that