See, I've developed this pathfinding system where the player is always the end of the path, and each node has it's own action that makes it calculate a path.
The whole idea revolves around one chart, a point of view chart, a multidemensional array, that tells what nodes can see what. I create this chart 4 frames after the level has been loaded, to ensure that the nodes have registerd themselves into an array full of handles. To generate this PoV chart, I first make the function wait untill the number of nodes ready is equal to the number of nodes that exist. I then set the first node in the array to me, and then the second to you. I do a trace, ignoring all models, and if the result is 0, then there is a path, so i fill it with 1. If it is anything else than 0, there must be something in the way, so I fill it with 0. Now 1 means a path, and 0 means no path. I repeat this untill the last node has done a trace with the node before it.
However, there is a problem. I have a level where I have used this idea, but I am getting strange results. I have three nodes in a line. The nodes on either side can see eachother, but the node in the middle can't see anything!
Is there anything that can affect c_trace, or make it produce a wrong answer? I will preform more experiments, but for now, I can't think of anything that would be the problem!
I will post the whole code tomorrow. I did not have it with me today.