[Solved] Master framecount timer for cueing multiple sprites playback

GDevelop looks so good! I have been in the swamp for a very long time trying to write a simple sprite and tweening animation framework in Livecode with mixed results and managed to achieve some of the early milestones in less than 30 minutes with GDevelop!

Anyway, this appears to be a common theme from searches but I am just trying to get my head around time and using timers: in particular as far as I can tell they are based around seconds but the engine itself is based around ticks?

Ticks would seem to me to be a good value to track as it’s essentially a frame, which means if I wanted say for my first UI button/sprite to start animating on at frame 30 and then stagger each remaining button/sprite to animate on every 5 frames after that - if I can track the tick/frame count this would be possible.

Working with whole seconds seems like too large a quantity. Obviously I can go 0.5 seconds but I just wondered if anyone else had found a way to use a framecount method?

I guess I could make a transparent .png sprite sequence that runs for 10 seconds and track that, then reset it back to frame 1 at the start of a new UI animation sequence or bake the timings into the sprite/button image sequences.

Quick Update. The transparent .PNG sprite and tracking FrameCounter does the trick quite well for a quick fix for those interested. I just made a 4x4 .png sequence

Bacically thewiki said:

Events at the top are executed first. Events are executed every time your game is displayed. This display is called a frame. It executes about 60 times per second.

Then you can create a global variable at start, and you increment this variable at the end of the eventsheet in an event without condition.
The number will increase and you should see 60 in the variable after 1sc.
And like you know 1fps/1tick/1 read of eventssheet.

Becareful of options of your game in game settings in project manager, you can set the fps to use.

Yeah cool. I thought as much. It could even be a scene variable. I’d have to put a cap on the top value to reset so it doesn’t become some crazy huge amount. And then making sure once the UI element has arrived it doesn’t animate back on because of the reset.

1 Like