Problems With Game Time

I have managed to find a number of tutorials on how to set up an hours:minutes:seconds:milliseconds timer. My problem is that because it is linked to game time, if you look at the menu for 10 seconds and then press play, the timer is already at 10 seconds when you enter the game. Is there a way to set the game time to start when you press play? I have tried making a new attribute and using that time to work the timer but for some reason it no longer shows milliseconds. Any help would be greatly appreciated.

Thanks.

Comments

  • CodeCellCodeCell Member Posts: 90

    Hi Hello,

    That's the exact issue I had come across a while ago. Here are two simple ways to go around this,

    1. Make your own game.timer. Simple have a game.attribute called Time. Have an actor on screen we the rule:

    When game.start is equal to True
    Timer - every 0.01 seconds
    Change game.time to game.time + 0.01

    1. Or if you don't want to do that you can simple create a rule for each timer, seconds, minute, hour, to save to another attribute. Then when game starts, you use

      Game.time/second - self.second.

    For example, when your game starts and 10 seconds has passed, it will be equal to 10-10= 0

    Then as time goes on : 50-10=40 seconds.

    Not really sure if I am answering your question, or even if my response makes sense.

  • colandercolander Member Posts: 1,610
    edited July 2014

    I attached a project file is this what you are after.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Use self time not game time.

Sign In or Register to comment.