Hi,
I have a question regarding the management of multiple events in the same timeline.
Actually in our game (WIP) we have (look at the events layers) :
Loading Image
We've mapped the principle of "startup", "active" and "recovery" frames from Street Fighter to our combat system.
What I want to achieve is :
Event "startup" : set the player frame status to "startup"
Event "active" : set the player frame status to "active"
Event "recovery" : set the player frame status to "recovery"
In the code itself (SpineHaxe used with HaxeFlixel), I want for each new event set the actual frame status to "startup", "active" or "recovery", what I do via the onEvent() method, catching the anim name and the event name to know wich hit is done and wich "frame status" is.
What I understood, by trying and looking in the library code, is that the events are "time-based" instead of "frame-based", wich I suppose is to avoid frame lost on slower machines or devices. The other thing directly relative to this, is that the events are fired even after the frame where they are placed (via the firedEvents array).
So, I have multiple "onEvent" between 2 events for the same event, let's say "startup" is fired 10 times between frame 4 and 13. Is the Spine runtime intented to act so ? Is there a way to just get one event, at the frame or time the event is placed ?
I know I can tweak this in the onEvent() method, by checking the last event fired, if the same, don't do anything, but in this case, how to handle the Spine "foosteps" sample if events of the same name are always launched between 2 events ?
Can you help me clarify this ?
Thanks.