How do I show the user how many points they have?

Started by NiksterG, Wed 02/03/2005 02:50:40

Previous topic - Next topic

NiksterG

How do I show the user how many points they have out of the total number of points?
Check out my games! (Not all made with AGS)

Gilbert

Just display the value of the variable game.score, in a GUI, a textbox, or where-ever you want, for example:

Display("Your score is now:%d", game.score);

You should have read the manual before asking a simple question.

NiksterG

okay, sorry. I looked there, but it didn't explain it well enough. Can any one answer another question? How do you cross fade music? I looked all over the manual, and I tried some of the script it gave, but none of it worked. Please help! :P
Check out my games! (Not all made with AGS)

Gilbert

It's the bottom left option in the general setting screen of the editor, but note that:

Crossfade music tracks - This allows you to tell AGS to crossfade between your background music tracks. Crossfading means fading out the old track while fading in the new one when the music changes. You can select a crossfade speed from the drop-down list. There are some disadvantages to using this option - firstly, it's fairly slow, since AGS has to decode two music files at once. Secondly, it only works with OGG, MP3 and WAV music. You cannot crossfade MIDI, XM, MOD or S3M music. (Copied from the manual)



NiksterG

Ok, I tried to do the display thing, but I couldn't find where to put it. I looked in the manual and even searched the web, but there's nothing. Where do I put the variable, and how do I program it so that the GUI is always "updated" with the right score? ??? I am desperately calling upon the great wisdom of those around me!Ã,  :D
Check out my games! (Not all made with AGS)

Gilbert

That's a text script line, you need to go into text script to use it.

But if you just want it always displayed on a GUI and automatically updated, just read the following section from the manual:
Other Features --> Editing the GUIs --> Interface text

By the way, when you start making a new game, GUI 0 (Status line) should be doing exacting the same thing already (unless you used that bare blank template, which was not intended for beginners), you should be able to learn from observing it.

SMF spam blocked by CleanTalk