Is It possible to clear WaitEvent() in middle of event?
Posted: Sun Apr 28, 2013 12:47 pm
I was first making the ingame things and was using WaitEvent() for things.
However, Now I finally made a Titlescreen test and came into bit of a problem.
I use WaitEvent to check if "startgame" button is pressed, and if so, then it starts the game. Since InGame also has WaitEvent() inside it, it means that the ingame waitevent is called inside another waitevent, and hence error quits the program.
I already made the program so that it uses the same waitevent command for titlescreen as well as ingame stuff, but I am bit worried about my current solution and think that it would be safer if I could use own Waitevent inside the ingame function.
Is there therefore a way to clear current waitevent and preferably without exiting the current waitevent event.
For what I am hoping to be able to do is that when InGame event is woke up, its first line would be something like "ClearEvents()" and after that when next WaitEvent() comes, it would be the only WaitEvent() in execution.
However, Now I finally made a Titlescreen test and came into bit of a problem.
I use WaitEvent to check if "startgame" button is pressed, and if so, then it starts the game. Since InGame also has WaitEvent() inside it, it means that the ingame waitevent is called inside another waitevent, and hence error quits the program.
I already made the program so that it uses the same waitevent command for titlescreen as well as ingame stuff, but I am bit worried about my current solution and think that it would be safer if I could use own Waitevent inside the ingame function.
Is there therefore a way to clear current waitevent and preferably without exiting the current waitevent event.
For what I am hoping to be able to do is that when InGame event is woke up, its first line would be something like "ClearEvents()" and after that when next WaitEvent() comes, it would be the only WaitEvent() in execution.