Procedural/dynamic game that allows the player to put down roads.
Basically what we would like to know is how we could prioritize certain nodes above other nodes, so if an AI entity would want to take a path, and he had a choice between several nodes, he would prioritize certain ones that we would select.
Any ideas?
Since the roads are made during runtime and not in the editor, I’m not sure if a point graph would be the right solution?
Due to how pathfinding works, it is not possible to prioritize some nodes, however it is possible to discourage the AI from traversing nodes. This amounts to essentially the same effect as prioritization.
So what you would do is to have 2 tags. The ‘Basic Ground’ tag and a ‘Road’ tag. On the Seeker component it is possible to set the penalty per tag and in this case you would set the penalty for the ‘Basic Ground’ tag to something like say 10000 to start with (a penalty of 1000 corresponds approximately to the cost of moving a distance of 1 world unit). You would leave the ‘Road’ tag with a penalty of zero.