I have this capx in which the objects measure the distance between them and node 0 and then the distance between all nodes, and add those up to an instance value called "distance".
I'm trying to make the one with the lowest distance value trigger the "move along path". But every instance is moving D:
Some help would be really apreciated <img src="smileys/smiley9.gif" border="0" align="middle">
Still haven't found out why this isn't working =/
First you're using a for each loop so only one sprite will be picked on each iteration. There's no point picking the sprite with the smallest distance from a group of one. As well as that 'on pathfinding path found' triggers once for each sprite so even the loop is unnecessary.
You'd want to calculate all the paths first and then pick the sprite with the smallest distance once each sprite has calculated it's path.
Develop games in your browser. Powerful, performant & highly capable.
I can't thank you enough man!!!
btw, you've helped me like 20 times over the past year xD love you =P
PD: i usually have trouble with the logic order of events -___-