Forum rules - please read before posting.

Displaying the value of a variable

Hi,

Two questions:
1. Is it possible to display the value of a variable on screen, in-game, without using coding?

2. I want to have a scene where the player has 15 minutes to try and complete it. I thought about making a variable and using 'wait' and 'increase by -1' actions to make a simple clock mechanism. The question is how do I display the clock to the player?
Is there a better way to approach this?

Thanks

Comments

  • 1. Yes, using the [var:X] or [localvar:X] token, where "X" is the ID number of the global or local variable as shown beside its name in the Variables Manager.  See the Section on Speech Tokens in the Manual - they can be used in Speech text or in Menu Labels.

    2. Custom coding is always easier for specific tasks like this, however you could do it with a smart use of two Global Integer variables that represent minutes and seconds respectively.  A backgound Cutscene could reduce the "seconds" by 1 every second, and when it reaches 0 sets itself to 60 and also reduces the "minutes" by 1.  When "minutes" reaches 0, the timer is up.

    The clock could then be represented in a Menu Label as:

    Time left: [var:X]:[var:Y]

    Where X and Y are the variable IDs for the minute and second variables.
  • That sounds like a perfect solution. Thanks!
  • edited July 2017
    Never mind. Solved :-)

    image


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.