Make the player stay on the set path?

Get help using Construct 2

Post » Thu Jun 26, 2014 3:00 pm

I am creating a mobile game but need to know how to make the player with the 'Pathfinding' behaviour actually stick to it's path. Here is a screen-shot of what I don't want to happen:
Image

Look at the text on the image... I want it to follow the straight line from point 7 to point 8 without cutting corners... Help with be appreciated!
B
5
Posts: 20
Reputation: 519

Post » Thu Jun 26, 2014 3:07 pm

Maybe it helps if you set diagonals disabled...
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
21
S
6
G
3
Posts: 664
Reputation: 3,855

Post » Thu Jun 26, 2014 3:10 pm

As long as you don't pick a new path to find until the current one is finished, this shouldn't be a problem. Sounds like you are resetting the pathfinding as soon as the player presses a new location. Just give each touch an object with an increasing index, and on arrived at X, pick X+1 and path find to that one next. In other words, you have to cache the touches.
ImageImageImage
B
71
S
22
G
259
Posts: 3,793
Reputation: 143,702

Post » Sat Jun 28, 2014 10:18 am

you could do it like this
You do not have the required permissions to view the files attached to this post.
B
257
S
43
G
15
Posts: 1,992
Reputation: 41,535


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests