|
Artificial Intelligence Tools - Find PathThe AI Tools package is an extension for Stencyl development environment. It is a general-purpose graphs toolset, which includes an implementation of A* pathfinding. Please see main page for more information. The "Find Path" block will execute the toolset's A* implementation. The function will return a list (array). There are two formats you can request: a list of steps, and a list of visited nodes. Regardless of your preference, if the call fails to produce a path (e.g. the goal is completely blocked), the list will be empty. You can check for failure by checking if the list that is returned has no elements. If this is unexpected, check the logs. Certain failures, such as a connection without a node, will trigger a warning. You can also use the export features to draw the graph and check for bugs in its construction. "as list of steps" option:The call will return a "list of lists". It returns a list of steps, and each step is a list with the following data:
"as list of nodes" option:The call will return a "list of lists". It returns a list of nodes, and each node is a list with the following data:
|