How do I Use Platform movement for AI and Ignore Keyboard

  • Hello

    I decided to use platform movement for "enemies" such as jumping frogs.

    Player and Frogs use the same Platform Movement Behaviour, and I simulate enemy movement by using "Simulate Control Left/Right" and "Simulate Jump" actions.

    The problem is, that Game player use keyboard keys for movement... and when any arrow is pressed, also enemies are reacting to the keyboard commands, so both player and enemies are jumping at the same time.

    There is an option to start ignoring controls for enemies on start of a layout, but when it's used, enemies completely stop moving, even with "Simulate Control" action.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You need to set both player and enemies default controls to "no", this is done while making the game.

    To move the player around,

    if keyhit.key(rightarrow) player.simulate.moving right ,, etc etc

  • That's exactly what i was looking for, thanks

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)