Pathfinding Problem.

Discussion and feedback on Construct 2

Post » Wed Apr 27, 2016 12:11 am

Hello,

I actually work on my game, a pixel strategy but I just had a problem about the pathfinding for units.
I need a good fluidity but this one takes time to function and i have some solid blocks.

I tried to use a behavior 8 direction to create my own pathfinding but without success...

However, i saw that we could take pathfinding positions with NodeXAT and NodeYAT but i don't know how to use them.

how can I solve my problem ?
B
3
Posts: 1
Reputation: 179

Post » Wed Apr 27, 2016 10:52 pm

https://www.scirra.com/manual/78/expressions

The expressions NodeXAT and NodeYAT get set by the action 'find path'. They are a list of away points.

To acces that list you first need to know how much waypoints there are. The expression 'Sprite.Pathfinding.NodeCount' gives you that info. Then you have to loop trough the waypoints from 0 to count - 1. And the expression to find the postion of the waypoints will be Sprite.Pathfinding.NodeXAt(loop) and Sprite.Pathfinding.NodeYAt(loop).

Better:
https://www.scirra.com/tutorials/1367/a ... -waypoints
https://www.scirra.com/tutorials/474/pa ... e-of-sight
B
33
S
18
G
28
Posts: 2,470
Reputation: 20,904


Return to Construct 2 General

Who is online

Users browsing this forum: SubtleCoder and 4 guests