I’ve seen in your code a check for ConfigureTagsAsMutliple, but actually defining this seems to cause errors in the Astar Code. Are multiple tags actually still supported? If so, how do I get it to work. If it doesn’t I can likely just make a custom graph update object and modify graph node to support pseudo tags that aren’t the standard tags built in.
I am afraid that preprocessor define is not well supported now.
You can support pseudo tags by just treating the tags as binary numbers. So if you wanted Tag1|Tag4 that is equivalent to Tag((1<<1) | (1<<4)) = Tag17.
What exactly are your needs for the multiple tags?
What I’m doing is marking nodes in the world with tags so their penalties will be lower if it’s a preferred cell. So I may mark a node as Basic Ground with a normal penalty. Then another node may be cover so it’s lower and then other things should affect some nodes such as a tag for player vision on a node, acid on a node, etc.
I’ve modified graph node to have some extra variables and a graph update object to modify those values when needed. Then in the GetTraversalCost method I check the node for those variables. It seems to work, but I’m not sure if it’s the most efficient.
Heh, it turns out that uses up way too much processing time that I can’t even generate paths on a large grid graph. My biggest concern for it is an enemy character should have a penalty for a tile if a playercharacter has line of sight on it. My way definitely isn’t efficient. Do you have any suggestions?
Well… you have to calculate it in the GetTraversalCost method somehow. Maybe you could cache it in a very low resolution grid.
So e.g you create maybe a 64*64 (or lower) boolean array which you use to cache the result, the path would then just look up the result in the array which would be pretty fast.
Hm, that sounds like a cool idea that could work. Thanks!