While loop behaving unexpectedly

0 favourites
  • 1 posts
From the Asset Store
SynthWave Loop Pack includes 68 seamless loops, founded on 11 original melodies. For use in game and custom works.
  • <img src="http://i.imgur.com/YxHs5DG.png" border="0" />

    I am trying to make a number count up to a point and stop. It should be very simple, I've never had any issues with timers that have counted down, but I'm not sure what's wrong here. What I'm understanding my events to mean is

    While Score 1 is Greater Than Score 2

    Add 1 to variable score22

    Wait 4 Seconds

    Set textbox to score2

    So what I'm expecting is it to do is count up by 1 every 4 seconds until the score is greater than score1. However what happens is that the number instantly jumps to 10. I'm not exactly sure where I've gone astray in my logic, any guidance would be much appreciated!

    Here's a .capx of the small loop: dl.dropboxusercontent.com/u/124549522/whileSample.capx

    Edit: Ugh, immediately upon posting I found just the information needed in the manual. I had been looking up stuff related to while loops when I needed to be looking at the wait command. Solved the issue by replacing the while loop with Every X Seconds and removing the wait from the actions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)