How do I Use Platform movement for AI and Ignore Keyboard

Get help using Construct 2

Post » Fri Sep 19, 2014 8:36 am

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.
B
4
S
1
Posts: 20
Reputation: 392

Post » Fri Sep 19, 2014 9:01 am

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
B
10
S
2
G
1
Posts: 92
Reputation: 926

Post » Fri Sep 19, 2014 9:14 am

That's exactly what i was looking for, thanks :)
B
4
S
1
Posts: 20
Reputation: 392


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, duditon, Kermad, R0J0hound, yiuyiu6666 and 7 guests