Linear movement with pathfinding

Get help using Construct 2

Post » Mon Feb 25, 2013 4:00 pm

Hi, constructers. I`m experimenting with pathfinding and trying to make some oldschool rpg-style (grid) movement. I have no problems with grid movement, no problems with pathfinding, but no success with combining first and second.

Anyone have any idea how to make character to find path and move along it by grids, not smooth and directly?
B
7
S
2
Posts: 49
Reputation: 982

Post » Mon Mar 11, 2013 12:36 pm

[2] :\\\\\\
B
8
S
2
G
4
Posts: 17
Reputation: 3,372

Post » Wed Mar 20, 2013 4:55 pm

Hi
I'm having the same kind of problem while combinating grid movement with pathfinding..

I didnt test it yet but maybe one idea could be:
once the path is found you store inside an array all the nodes positions (using NodeCount, NodeAtX etc.. to find them) and then you round these positions according to your grid size (es. 32x32 grid each position is changed to: (floor(x/32)*32)+16 etc..
in this way you obtain a list of nodes positions aligned with the grid and you can have the player move along them.
very frustrating though..
B
5
S
1
G
2
Posts: 22
Reputation: 1,824

Post » Wed Apr 10, 2013 9:11 pm

Something that I have found and enjoy is the plugin found here:
http://www.scirra.com/forum/plugin-fast-path-finding-preview_topic50820.html
Its "fast pathfinder." the difference is that the regular one finds a path that's wide enough by calculating a pixel by pixel path.
Fast pathfinder calculates blocking on a grid that you designate the size of. I really like how it works. Check it out.
B
4
S
1
G
2
Posts: 3
Reputation: 1,513


Return to How do I....?

Who is online

Users browsing this forum: Lof, YoHoho and 23 guests