After starting timers with the same name/tag for several instances, when more than one should trigger at the same time, only the first instance is picked (and the timer event triggers only once).
A workaround is to have a "foreach" as a "super-event" (also works as a sub-event) around the timer trigger events.
In my humble opinion, it seems to me that some trigger events are not working as trigger events at all, but rather as standard (i.e. "picking instances") events.
Also, no answer was found here:
PS: A similar issue seems to occur with the "On collision with object" event, in the sense that if some object collides with two other objects at the same time, only one event is triggered. For most of the cases, that would not be a problem, since the instances are picked and the actions run for all of them, but in my case, I was calling a Function and passing the UID of the collided object as an argument, which results in only applying the Function to the first one. A "foreach" also resolved this problem.
Attach a Capx
Description of Capx
Press each "1" button to trigger a "TimerOne" for it; Press "All" button to trigger a "TimerAll" for each.
When "All" is pressed, you can see that the timer is set for all the "1" instances, but only triggers once, for the first one.
When you press "1" buttons, a timer triggers correctly for each one, even when you press several very quickly.
In the "Timer bug workaround.capx" the bug is corrected by having a "foreach" before the timer trigger events.
Steps to Reproduce Bug
- Start a timer with the same tag and the same duration for more than one instance of the same type;
Timer event only triggers once for some instance.
Several timer events should trigger, one for each instance for which the timer has been started.
- Chrome: YES
- FireFox: YES
- Internet Explorer: YES
Operating System and Service Pack
Windows 7 Service Pack 1
Construct 2 Version ID