How do I reset the timer txt?

Just started using Construct 2? Post your questions here

Post » Thu May 29, 2014 7:19 pm

Hi I have an app which starts a timer on the second page and then has a stop button which sends you back to the main menu (first page). My problem is when you go back to the second page (the timer) it continues from where you left off instead of going back to 0 like I want it to.

I have settext((int(time)) I can't reset that though.

https://www.dropbox.com/s/nf5n73ebcg2iw ... 193795537#
B
10
S
3
Posts: 113
Reputation: 1,191

Post » Thu May 29, 2014 8:23 pm

Add a Global variable which stores the time the layout starts. On start store time in it and use the following equation to set the time text:

settext(int(time - LayoutStartTime))

Capture.PNG
You do not have the required permissions to view the files attached to this post.
B
38
S
12
G
11
Posts: 331
Reputation: 7,712

Post » Thu May 29, 2014 11:28 pm

Thanks so much.
B
10
S
3
Posts: 113
Reputation: 1,191


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests