@猫狗乱舞 and [USER=“908991”]kup guitarplayer[/USER]: Between you this is quite a lot to answer, and in many cases questions I will need to do some testing to figure out the best answers to. I have a very pressing deadline at work by the end of this week, so I cannot promise to answer these questions in depth before early next week. Sorry about that, but deadlines + having a small kid = very little time remaining. But I have some follow-up questions to you that will make it easier for me to help you as soon as I get the time:
@猫狗乱舞: I don’t understand your first figure. So the two blue circles are friendly units and the red circle is an empty tile that the player clicks to move to? And when you say that the units are pushed, where do you want each of the two units to end up?
and sorry about the lack of tutorials on the ability system. I hope to make a lot of new tutorials for all sorts of things as soon as I’m done with the next update.
“use tile values” means that the ability will calculate a value for each tile in move range (determined by things like if they have cover, if they are close to a lot of enemies etc.) and take this into account when deciding what to do. “use slow loops” is for optimization. Determining the value of all tiles relative to all targets is a costly operation, so using slow loops allows the AI to calculate it over multiple ticks.
As for big units. the underlying code there is pretty complex. I generally suggest people not use big units unless they really need to, since it is the sort of thing that makes everything else more complicated. If you are determined to use them anyway, please specify what parts of the system you are struggling to understand and I will try to explain.
[USER=“908991”]kup guitarplayer[/USER]: The suggestion I came with only works if the map consists of paths that are 1 tile wide (like the path along the edge of a Monopoly board). In your screenshot it seems like all tiles are open to be moved to, and it will not work. If you are not making a game similar to Monopoly I would appreciate if you could explain your game in detail so I know what assumptions I will have to keep in mind. Is there a game with similar rules you can point to? How exactly does the board look? What can a player do during their turn?
For your first question you do not want to remove tile edges when you simply want to remove tiles from a specific unit’s pathfinding result. Removing edges will remove these tile connections from the grids permanently, not just for the current unit. But if you already have a list of all the tiles you do not want the unit to reach, put the Paths output of RunPathfinding in a local variable, loop over the keys and check them agains your list of tiles to remove and remove these from the local variable when you find a match.