How do I prevent a player from going backwards in platformer

Just started using Construct 2? Post your questions here

Post » Fri Jan 13, 2017 9:40 pm

Hi All!

Working on my first game and loving it. I'm building a side-scrolling platformer. Some sections are basic walking because I'm adding dialog and such. How do I prevent a user from going backwards in the layout? Like, once they push forward in the layout if they attempt to walk backwards (left) in the window I want it to be like hitting a wall so they know to push forward.

Didn't see anything clear or in the forums about this. Might end up not being a mechanic I keep, but curious for now.
Thanks!
B
5
S
1
Posts: 1
Reputation: 329

Post » Sat Jan 14, 2017 11:52 am

Using Platform behaviour.
Set its Default Control property to No.

Use the Simulate Control action to script only the movements that you want. Need to add Keyboard plugin to the project.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 4 guests