How do I keep the best time (time counter)

Get help using Construct 2

Post » Fri Oct 17, 2014 5:19 pm

Hi folks,

I am on a little game that is all about completion time per level.

Right now I have :

- a global variable called timer that check the time globally on every level layout start
- a global variable called timer_result that is set to timer when the player reach the end of the level
- a global variable per level called result1_1 (1_2, 1_3 etc) that is used to display the best time on the level selection layout

My timer works, I get the time saved in timer_result when the player reach the end of the level but my issue is to change or not the result1_1 based on timer_result.

On my event sheet I get

Code: Select all
On end of layout 
Result1_1 = 0   
Timer_result < Result1_1

====> Set Result1_1 to Timer_result


When I do that Result1_1 stays at 0, if I disable Timer_result < Result1_1 condition Result1_1 is updated but even if the new time is greater than the old one....

I am brand new to using variables in my game and even it seems logical to me I am pretty sure I am doing something wrong....

Thanks in advance guys.
B
4
Posts: 5
Reputation: 210

Post » Fri Oct 17, 2014 5:26 pm

Just figured out that the Result1_1 as a condition makes no sense but even without it I still have issues...
B
4
Posts: 5
Reputation: 210

Post » Fri Oct 17, 2014 5:41 pm

As we always say, this is when you put a question on a forum that you found the solution... It is surely dirty but it works so sorry for taking a forum spot for nothing :)
B
4
Posts: 5
Reputation: 210

Post » Fri Oct 17, 2014 7:52 pm

No capx...No solution ;)
Image
B
64
S
23
G
7
Posts: 1,483
Reputation: 10,827


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 1 guest