Time Expressions

  • Ashley

    I wanted to PM you about this but I didn't find a PM button.

    Anyway, I'm working on a game and I have a Time Attack Mode in which I want the camera scroll to speed up at time goes on, but if I use the "time" or "wallclocktime" expression its the total time the entire game has been running, I just want the time since the layout started, so it goes back to zero when the layout restarts. I checked the Layout and Time Sections in System Expressions and can't find them.

    Is there a "Layout Time" or "Local Time" expression in Construct2? Or maybe a way to find the time since the layout has started (that resets along with the layout when the layout resets)?

  • Hi Nesteris. You could set a counter variable and then increment it every second.

  • The way to do it is to set a variable (lets call it begintime) to the Time system expression At the start of the layout

    Then you just measure the difference (time - begintime) to have the current layout time, in seconds.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Aphrodite

    Thanks I'll use that!

    Edit - Works perfectly, thanks!

  • Thanks Aphrodite, that's a better way to go. I haven't used the time system expression yet. I'll check that out.

  • Thanks for also perfectly demonstrating why I have disabled my PMs. Loads of people can help you here on the forum! When I had them enabled I was inundated with private support requests which could easily have been answered by someone else on the forum. You don't even really need to tag me for this kind of thing.

  • Ashley

    Thanks? Lol At least I can be the poster boy for all the new users so they know what mistakes not to make

    Good to be helpful in some capacity.

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