0

I create a 2D RPG Game and managed to make there some walking of character by pointing the destination with mouse click. Now, I set an enter menu that shows up after running a program and before a game loop starts. When I press (or release) a mouse button to start a game menu_ev.type == ALLEGRO_EVENT_MOUSE_BUTTON_UP, it leaves the enter menu while loop and proceeds to the game loop but not waits for an another mouse click to move character but moves it to the place where mouse was clicked (in the enter menu).

I want it to wait in the game loop for another mouse click to walk. I thought that ALLEGRO_EVENT_MOUSE_BUTTON_UP would do the job but even then the game loop catches mouse as event mouse button down...

Both in the enter menu and game loop there are different ALLEGRO_EVENT_QUEUEs and EVENTs. I also tried to change it to ALLEGRO_MOUSE_STATE but changes nothing.

Thanks in advance!

P3piK
  • 3
  • 3
  • I cannot comprehend what you expect us to do with this information. – Lightness Races in Orbit Nov 17 '16 at 19:22
  • I wonder if you can help me cope with this mouse clicking. To make this code wait somehow for new event and now for existing one (I mean in the game loop not to take this mouse click from enter menu but wait for new one) – P3piK Nov 17 '16 at 20:36
  • Flushing event queue helped! al_flush_event_queue(event_queue) – P3piK Nov 21 '16 at 08:49

0 Answers0