Putting a Timer event macro inside Loops wasn't working. #56
This fixes it.
This was happening because the loop was trying to execute all its loops in a single frame, which did not considers the timers delayed execution using 'run_queued_macros'.
I think this is quite an ugly solution, feel free to reject this and make a more elegant fix if you want to.
Hopefully this helps show what the problem with timers inside loop was.
Changes
I've modified 'run_queued_macros' a bit.
Instead of receiving the 'action_id' and 'index', it now receives a list of macros to execute. The only two places it is used, it already has that information and it was recalculating it inside again.
In order to make the loop work properly with timers, I had to pass extra info to the play function so it can deal with the loop instead. So I added those few optional parameters.
Putting a Timer event macro inside Loops wasn't working. #56 This fixes it.
This was happening because the loop was trying to execute all its loops in a single frame, which did not considers the timers delayed execution using 'run_queued_macros'.
I think this is quite an ugly solution, feel free to reject this and make a more elegant fix if you want to. Hopefully this helps show what the problem with timers inside loop was.
Changes
I've modified 'run_queued_macros' a bit. Instead of receiving the 'action_id' and 'index', it now receives a list of macros to execute. The only two places it is used, it already has that information and it was recalculating it inside again.
In order to make the loop work properly with timers, I had to pass extra info to the play function so it can deal with the loop instead. So I added those few optional parameters.