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$
3
  • $\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
    Commented Jun 10, 2014 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
    Commented Jun 10, 2014 at 22:33
  • $\begingroup$ THANK YOU SO MUCH! MAKE THIS AN ANSWER AND ILL PICK YOU! $\endgroup$
    – blackhole
    Commented Jun 11, 2014 at 2:39

1 Answer 1

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$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .