Reset Time

0 favourites
  • 5 posts
From the Asset Store
Time rewind like in "Braid". Choose objects that will be affected by time rewind
  • I've got events which spawn an object at a random time, this makes use of time scale.

    I've got a problem, I need to reset the time to 0 on when the player dies. For example, the player dies 10 seconds into the game, I click restart or menu button that pops up on screen, I need it to reset the time that has passed to 0.

    You can restart the layout or reset global variables, which is no problem but there doesn't seem to be an easy way to set global time to 0.

    I was wondering if anyone had a solution.

    Thanks for reading :)

  • The time scale is used to slow down or speed up the game time, so I assume you're talking about the game time itself, the number you get by using the 'time' expression? You cannot reset the game time, instead, create your own variable (call it something like 'timer') and just add 1 to it every second. (or even better, add 'dt' to it every tick)

    Edit: If you want to use time scale, you have to do it with delta-time (dt)

  • Yeah, sorry I've just tried to clarify that :).

    The problem is, the random spawner i'm using makes use of the time expression. I did use a variable originally, but couldn't couldn't see how I'd implement a random spawner if I used one.

    Here's a link to the capx. dl.dropbox.com/u/17611007/create%20at%20random%20period.capx

    It was made by someone else on the forum (the name slips me at this moment).

    EDIT: Maybe it'll work if I set the current time to an integer of the variable. Will try that now :)

    EDIT2: Looking good at the moment. Think that may have solved it. Thanks for the help :) :)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • HI toby,

    I have got the same issue and i was looking to reset my timer..could you help me out on this..

  • Wish we could reset the time... although I suspect there is some kind of internal game engine issue that would arise if we could, so I guess the variable trick will have to do.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)