Hi all.
I have a pretty simple setup with a player character on the center of the screen and several buttons at the bottom of the screen.
Each button triggers a different event, which makes the player run through some sprite sheets in different ways.
At the moment I have it setup so that in each event there is a function to check which frame of the relevant spritesheet is currently displayed.
As my project scales in complexity, I can see it becoming a bit of a problem.
Does anyone know of a way to check which event AND frame are “active” at any given time?
For example, something like;
if player1.event == event1 and player1.currentFrame == x then
--relevant logic here
end
If there is a way to do this, I could have one event listener which effectively filters the logic for each of the buttons, instead of calling/deleting listeners with each and every button press.
Hope my question is clear? I can post a full example if it’d help.
Thanks
Spider. [import]uid: 67933 topic_id: 21472 reply_id: 321472[/import]
