Timer behavior being inconsistent?

Not favoritedFavorited Favorited 0 favourites
  • 5 posts
From the Asset Store
_______________ Animated sand timers _______________
  • I'm currently working on fixing up the dialogue system in my game, as the sounds were not synced up with the rate of the text. I'm using the typewriter text action and also starting a timer that is supposed to be synced with the rate of each character showing.

    I'm using the timer to keep track of where the typewriter is currently at, that way I can play sounds when the text changes. To put pauses in the text I've been putting + signs with a size of 0 using bbcode, so I'm just comparing the PlainText to make sure that sounds don't play when its paused.

    However, the timer behavior seems to be wildly inconsistent. Sometimes it's synced up perfectly, other times it is super delayed or has a big spike, and other times its super fast, and the results change every time I play the project. Is there something I'm missing with the timer behavior? Does it maybe get inconsistent at fast speeds? I'm super lost and I have no idea if its an issue on my part or an engine issue so if someone could help that'd be amazing

  • No idea but this soundslike a perfect use case for timelines.

  • How would the timeline work? Can timelines interact with text like that? (i've only ever used them for sprite animations so i have no idea how i'd mkae typewriter with that)

  • After some more testing I think it could just have to do with the speed of the timer, and might even be an engine issue. The slower text (aka the ones with longer timers) are usually more consistent and sometimes with timers that aren't slow if I pause the game via debug mode and advance frame by frame the timer never triggers until I push resume.

    Does the system only check for timers every couple frames maybe? The fastest timer there is is (1 / 30) seconds but that should mean it only finishes every other frame, so why can't the engine pick up on it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nevermind, got it all sorted out! I changed the timer behavior to check how much wall clock time has passed instead and its so much more consistent, I do still wonder if this means that the timer behavior has some bugs when set to super fast speeds though, might be worth looking into.

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