How to Limit Character movement?

Get help using Construct 2

Post » Fri Feb 01, 2013 9:40 pm

I have a spaceship here that I want to be able to move left, right, up and down.

However, if you press the up and right arrow, it of course goes diagonal up and to the right.

Is there a way to limit the movement of the ship, so it can no longer travel in a diagonal direction?

I can find plenty of tutorials for movement and different ways to achieve the same thing, but all of them seem to still allow my character to move diagonally.
B
4
Posts: 78
Reputation: 606

Post » Fri Feb 01, 2013 10:09 pm

Yes you can, but something else must happen. For example you can have the spaceship going UP if you press UP+RIGHT key. Or you can simply make it stop moving.
I can add an example if you'd like.
B
11
S
2
G
4
Posts: 78
Reputation: 3,292

Post » Fri Feb 01, 2013 10:39 pm

I get what you're saying. If you have an example already that wouldn't be too hard for you to show, I'd really appreciate it!
B
4
Posts: 78
Reputation: 606

Post » Fri Feb 01, 2013 11:14 pm

if you are using the 8 direction behaviour you can set, on the left side, from 8 directions to 4.
B
14
S
6
G
2
Posts: 136
Reputation: 3,210

Post » Fri Feb 01, 2013 11:50 pm

Yeah I was using a different method, and changed it to 8 directions and found the 4. It seems to be working pretty well now. Thanks guys!
B
4
Posts: 78
Reputation: 606


Return to How do I....?

Who is online

Users browsing this forum: fredriksthlm, marekmk, Yahoo [Bot] and 1 guest