How do you test if no keys are being pressed?
How do you test if no keys are being pressed?
Using the Control-X object, a negated "Repeat while any key pressed" condition will work.
Nope, it only checks the last pressed key. So if you press 2 keys and release the second it will give a false positive...
Hey, guys your still haven't helped me out. Can anybody help me please?![]()
Pick a Key and Negate it. If the Key isn't pressed the condition should be true?
[color:#FF0000]X[/color] Upon Pressing "spacebar"
Do
nnnnnn
Plus tell more about what you want to do, if you can. There might be a work around.
Sorry for not being clear about it. what I want it to do is... when I press "D" I move right, and have my animation for walking, and if I'm not pressing "D" the animation gets changed or restored to the stand animation. I'm using my own movement engine.
If this is the case then can't you do what 00J suggested, but change the key?
Only One Action When Event Loops
+Repeat whilst D is pressed
- Play animation "Walking"
Only One Action When Event Loops
+[negate] Repeat whilst D is pressed
- Play animation "Stopped"
I can't remember whether "Only One Action When Event Loops" is necessary though
It is not, but it's better to include it.Originally Posted by Raylax
I can't really see why it's better though. It's not always true that conditions eats less resources than actions.