Originally Posted by Ricky Uppon pressing Q
toggle flag 3
pretty simple
Edited by the Author.
LMAO! That's completely true! I think most people forgot the toggle flag button existed
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
Some of us do not think logically, that is why we oversee the simple things, that can make your life easier. It has allways been a problem for me. I must continually say to myself; "Think logical!"
Of course the toggle action is the one to be used. Know your software and know your logic, and things can get much simpler - hehe.
Originally Posted by Peblo Your code is flipping it on and off instantly. You need to add another flag which turns on when you press Q, and turns off when you let go.
Example, flag 10 is the flag I was just talking about.
Upon pressing Q
flag 3 is off
flag 10 is off.
Flag 3 on
Flag 10 on
Upon pressing Q
flag 3 is on
flag 10 is off.
Flag 3 off
Flag 10 on
Flag 10 is on
(negate) Repeat while pressing Q
Flag 10 off
So when you press Q, flag 10 turns on, and when you let go, it turns it off.
Edited by the Author.
Why not take the events he originally put up and add "Only one action when event loops" to each? Or use one with the toggle flag option and "Only one action when event loops".
Originally Posted by Ricky Uppon pressing Q
toggle flag 3
pretty simple
Edited by the Author.
LMAO! That's completely true! I think most people forgot the toggle flag button existed
I certainly did. But I was thinking in terms of the other one-- the one involving menu selection changing, I didn't think about the specific problem.
Peblo Custom ratings must be 50 characters or less
Registered 05/07/2002
Points 185
6th September, 2008 at 00:31:38 -
Originally Posted by Jon & George Lambert
Originally Posted by Peblo Your code is flipping it on and off instantly. You need to add another flag which turns on when you press Q, and turns off when you let go.
Example, flag 10 is the flag I was just talking about.
Upon pressing Q
flag 3 is off
flag 10 is off.
Flag 3 on
Flag 10 on
Upon pressing Q
flag 3 is on
flag 10 is off.
Flag 3 off
Flag 10 on
Flag 10 is on
(negate) Repeat while pressing Q
Flag 10 off
So when you press Q, flag 10 turns on, and when you let go, it turns it off.
Edited by the Author.
Why not take the events he originally put up and add "Only one action when event loops" to each? Or use one with the toggle flag option and "Only one action when event loops".
It usually works out that way, but sometimes french logic overrides your own and you have to find alternate ways of doing code.
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath