How to check if timer1 has ticked or timer2 has ticked and then do actions?
RPG Hacker
Use two different event queues and two different event structs.
Mark Oates
You can check the .timer.source subfield of the ALLEGRO_EVENT.
#SelectExpand
1switch(ev.type) 2{ 3case ALLEGRO_TIMER:
4if(ev.timer.source == timer1) 5{ 6// do things for timer1 7} 8elseif(ev.timer.source == timer2) 9{ 10// do things for timer2 11} 12break; 13 default:
14break; 15}