Hi everyone!
I'm having difficulties with the Grid Move node in Battle AI. I try to make my NPC combatant move toward the nearest cell of a specific Grid Cell Type and it never works. I checked the Can Use Check Only box in the parameters and the node always exits to Not Useable even though I checked that there is only one cell of the specified cell type in the entire battle grid. If I use the same node but with "Move towards" setting instead, I can specify a target and my NPC moves towards it, so I know the system works, except when I use the Grid Cell Type option. Finally, I also tried to use the Check Grid Cell Type node to check if the user NPC is actually on a specific grid cell type (I select "self" as the target) and, even though it is (I can check in the inspector by clicking on the cell), it always exits from the "failed" output.
What could be wrong?
Btw, I use ORK version 2.34.0 for Unity 2020.3.2f1.
Thanks!
So the problem only happens because I have to change the cell type dynamically, in the middle of the battle.
Is there a command in C# I could use to actually refresh the grid so that the AI can identify the new cell type change?
I haven't tested it, but try to do the following:
cell.cellTypeID = cellTypeID;
cell.ClearSettings();
cell.ShowPrefab();
cell is the BattleGridCellComponent of the cell, cellTypeID the ID/index of the grid cell type.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!