Getting the character to display score... SOLVED

Started by monkey0506, Sat 14/08/2004 20:49:34

Previous topic - Next topic

monkey0506

Just as a test of the features, I'd like to try and get the character to display the score. There are only two possible scores. 0 or 800. The only way I can find of displaying the score is @SCORE@ and @TOTALSCORE@, but I can't use these in a display message.

Scummbuddy

i believe you can, but im away from my manual at the moment. I think it has to do with


Display("the score is %i., "variable"); or something... im not exactly sure at the moment.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Barbarian

As an example of how to display the current score and the possible total score, you could use in a script:

Display("Score: %d out of %d", game.score, game.total_score);

Conan: "To crush your enemies, see them driven before you, and to hear the lamentation of the women!"
Mongol General: "That is good."

Blade of Rage: www.BladeOfRage.com

monkey0506

Thanks. I knew about the %d thing, but I didn't realize you could use it twice in the same message for two different things.  ;D

SMF spam blocked by CleanTalk