How can I check table data from Path find?


I have a grid of cells and am using the path find behavior for an actor to navigate the grid and all is good...however before the actor follows the path I would like the cells that are on the path table to do X. Basically what I'm looking for is a way to tell a cell that is on the path table to change it's self.attribute to true otherwise false. Ideas??

Thanks D


  • pHghostpHghost London, UKPosts: 2,282Member

    When the path is generated, you get a table with the path written in with step coordinates.

    You can use these coordinates to communicate to your grid, as it corresponds to it. Use the tableCellValue function in the expression editor the coordinates give you the correct row/column.

  • pHghostpHghost London, UKPosts: 2,282Member

    Alas, the A* module is more suited for live-action pathfinding, as it misses some crucial functions to be fully helpful with turn-based games. For example, you need to create a table with the costs of entering a tile (speed of walking through), which it uses to do the calculation, but it never passes you back the total cost of the path it generates (even though it certainly knows it). This means that if you have a limited amount of Action Points or a similar system to judge how far a player can move, you need to do these calculations yourself extra by table referencing and all that. This unfortunately means it is more practical in such cases to just make your own A*, which manages everything at once. :disappointed:

Sign In or Register to comment.