How To: Counter displayed on screen in gamebook? [SOLVED]

So in my gamebook, certain choices increase certain stats, which I'm keeping track of with counters. For example, a right answer might increase the "brains" counter by 1. How do I make it so that the stats are on the screen during the game, so the player knows what their stats are? Is this even possible in a gamebook? Thanks in advance.


Are you wanting it to be there before the room description???
Like:
Name: Me
HP: 12 MP: 9 (other stats)
You enter the room from the north. You are surrounded by the stench of the wet dungeon walls.

Then all you need to do is call a function (or a sub) in the before entering room script.
There may be a global before entering room, so that you only need to do this once.


In a gamebook, there is a script which runs before every page (on the 'scripts' tab of the game, I think). You can use that to display messages if you want them to be on every page.

If you want to include a counter in text (whether through the "print message" script function, or in the text of a page) you can use the text processor. Just include {game.name_of_counter} in your text. (counters are stored as attributes of the game object)


Thank you! I was not aware of the game script page. I somehow missed it.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums