Time-triggered events are occasionally skipped

0 favourites
  • 6 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • If you wouldn't mind loading the title of my game so I can explain the problem:

    http://www.scirra.com/arcade/addicting-action-games/2014/rebound

    As you see, the game's title "Rebound" is gradually formed step by step from first vertical and then horizontal lines. I do this by having a sprite with 3 animations, first vertical lines, then horizontal, and then the completed image with diagonals. The intended effect is to have lines move across the screen, and for the animations to change beneath these lines, and not for the animations to appear just out of the air, so to speak.

    So, to time this I have for example an event such as "System Time = 2 seconds" event, which creates the vertical lines. Then a few seconds later the same kind of event to change the animation frame to 1 just at the moment the lines are passing over.

    The problem is this type of event seems to be temperamental, and on certain loads either the vertical or horizonal lines, or both, fail to be created. Is there a reason for this? And has anyone recreated the problem when clicking the above link?

  • Instead of doing "system time = 2 seconds", which will indeed sometimes skip, use "system time > 2 seconds" and "trigger once".

  • You should always share a .capx so we can see exactly what you've done. If you've done 'Compare two values' and compared 'time' equals '2', it will almost never run because the time increments in ~16ms steps. If you did the system 'Compare time' condition and checked 'equal to 2', it should never skip because a workaround has been implemented in to that specific condition to prevent that problem.

  • I'm using 'Compare time' and I actually had it set to 'equal to 2.0'. Should this result in skipping when setting it simply to '2' shouldn't?

    Either way, sqiddster's suggestion seems foolproof, so I'll implement that! Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley, that's interesting. I never realized there was a workaround there!

  • If you think there is a bug, please reproduce it in a new project from scratch and submit to the Bugs forum!

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