Page 1 of 1

How to ignore input

Posted: Thu Dec 11, 2014 3:12 pm
by Peacfulrvr
I have a screen that moves an object right and left showing the player how it looks. However, my test show people just start madly clicking away ... once the object starts moving can I stop clicks from effecting the movements?

Re: How to ignore input

Posted: Thu Dec 11, 2014 3:46 pm
by magice
The problem is not how to ignore input. That is done with a simple if then statement. The problem is finding the criteria you wish to use for making that decision. In this case, it might be as simple as creating a delay before the control is available again. Perhaps a variable (or custom property) that is set to true when the control is activated, and a send in time that resets it to false.

Re: How to ignore input

Posted: Thu Dec 11, 2014 4:06 pm
by Peacfulrvr
Now that I read it I am like DUHHH --- that makes sense and I should have known. Thank you for the help. I was a programmer like 20 years ago and am working the rust out of my coding brain.

Re: How to ignore input

Posted: Thu Dec 11, 2014 4:29 pm
by magice
Peacfulrvr wrote:Now that I read it I am like DUHHH --- that makes sense and I should have known. Thank you for the help. I was a programmer like 20 years ago and am working the rust out of my coding brain.
20 years? My rust sometimes comes back after 20 minutes. :oops:

Re: How to ignore input

Posted: Thu Dec 11, 2014 7:17 pm
by jacque
You could also call flushEvents after the object finishes moving.

Re: How to ignore input

Posted: Fri Dec 12, 2014 5:29 pm
by Peacfulrvr
flushevents? I will have to look that one up