0
$\begingroup$

I have a simple character, who has simple animations. In the logic editor, I have a Keyboard sensor (W) > And controller > Action actuator set to Loop stop.

I did the same with another keyboard sensor (S). When I play the game and use W it's fine, and when I use S it is also fine. But when I press both of them (W+S) and let go of only one of them, the animation stops.

This only happens when I wait for a second after pressing one (W or S) and then press a second. In other words, the game is fine until I press 2 of the functions at once.

How can I let both W and S work fluently with Loop Stop enabled?

$\endgroup$
  • $\begingroup$ Please don't close question, like always, I tried to make it as clear as possible, I am in danger of being blocked! $\endgroup$ – blackhole Jun 10 '14 at 22:28
  • $\begingroup$ I'm not entirely sure what you are asking, but here's a guess anyway.. Does it work if you use an or controller instead of and? $\endgroup$ – gandalf3 Jun 10 '14 at 22:33
  • $\begingroup$ THANK YOU SO MUCH! MAKE THIS AN ANSWER AND ILL PICK YOU! $\endgroup$ – blackhole Jun 11 '14 at 2:39
4
$\begingroup$

This is because an and controller requires all connected sensors to be true to pass a signal to the actuator. An or controller requires that at least one of the inputs is true.

Think of it this way:

  • An and controller requires both sensor 1 and sensor 2 to be true.

  • An or controller requires either sensor 1 or sensor 2 to be true.

This is just boolean logic, see the wiki for more details.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.