Is it possible to use WaitEvent() in continuous program?
Posted: Wed Apr 24, 2013 10:47 pm
I know there is CheckEvent(), and I have been using it, but since Andreas warns from using it, I have been thinking if WaitEvent could replace my needs.
Problem with WaitEvent is that as far as i understand it, program stops until something happens.
But I would like something to happen at same time.
As example, I am right now making a turn based game, and I am using buttons to handle pretty much everything.
However, What I would like to happen is that while WaitEvent() is waiting for something to happen, I would want some animations to happen on bacground, like unit ywaning, buttoimages flashing or something similar.
Is there any possibity to this with WaitEvent()?
If not, then is it possible to limit what all CheckEvent() keeps checking?
For what Andreas once mentioned is that using CheckEvent() makes it look through every possible place if something have happened.
I have been using CheckEvent() before, and while games itself seem to work fine, if you do something on background, there can happen lot of distortion from using that.
Therefore what I am thinking is that if i could limit CheckEvent() to just check all the created buttons for example, maybe that would solve my problem, or should i just abandon the buttons and replace them with layers with my own routines?
Problem with WaitEvent is that as far as i understand it, program stops until something happens.
But I would like something to happen at same time.
As example, I am right now making a turn based game, and I am using buttons to handle pretty much everything.
However, What I would like to happen is that while WaitEvent() is waiting for something to happen, I would want some animations to happen on bacground, like unit ywaning, buttoimages flashing or something similar.
Is there any possibity to this with WaitEvent()?
If not, then is it possible to limit what all CheckEvent() keeps checking?
For what Andreas once mentioned is that using CheckEvent() makes it look through every possible place if something have happened.
I have been using CheckEvent() before, and while games itself seem to work fine, if you do something on background, there can happen lot of distortion from using that.
Therefore what I am thinking is that if i could limit CheckEvent() to just check all the created buttons for example, maybe that would solve my problem, or should i just abandon the buttons and replace them with layers with my own routines?