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
15
S
3
G
1
Posts: 329
Reputation: 2,012

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
21
G
220
Posts: 3,648
Reputation: 123,725

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
245
S
37
G
15
Posts: 1,940
Reputation: 40,089


Return to How do I....?

Who is online

Users browsing this forum: Lancifer and 9 guests