How do I keep the best time (time counter)

0 favourites
  • 4 posts
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • 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

    On end of layout  
    Result1_1 = 0    
    Timer_result < Result1_1 
    
    ====> Set Result1_1 to Timer_result[/code:sdgzwj6b]
    
    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.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just figured out that the Result1_1 as a condition makes no sense but even without it I still have issues...

  • 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

  • No capx...No solution

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