How do I ignore input for only 1 direction

Get help using Construct 2

Post » Mon Aug 24, 2015 8:11 pm

is there any way to disable movement from only 1 direction? As in,

when X happens > ignore 8direction user input

but only for walking right? So that I can walk all other directions except right?
B
5
S
1
Posts: 54
Reputation: 508

Post » Mon Aug 24, 2015 9:04 pm

You can disable the default controls on 8direction and set up your own in events.
Right arrow key is down -> Simulate pressing right etc...

Then you can add whatever conditions you want. For example: give the player an AllowedToMoveRight boolean and you can have the conditions:

Keyboard: Right arrow key is down
Player: Is AllowedToMoveRight -> Player: Simulate pressing right

Then you can toggle that boolean to prevent walking in that direction.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,650


Return to How do I....?

Who is online

Users browsing this forum: dop2000, mcscooter and 21 guests