Hey guys, so I have a building set up that spawns and sends some units at the enemy if they're within a certain proximity (via triggers). Currently its just done by seeing if a unit is in a region surrounding the building. Because there's a lot of cliffs I was thinking maybe there'd be a better way to do it via pathing cost. It seems there's one pathing function that includes units in it, and one that disregards units completely. The disregarding units completely seems like it would be best, except it also disregards things such as rock barriers. Because this is a map that has a tug of war element to it, the first function can result in huge pathing cost values (especially if you use a point thats inside of an existing unit, although I was able to bypass that problem by using a function that searches for free space. Still, when there's lots of units in the way, I doubt this method will still work).
So is there a way to include certain units in the pathing calculation?
i think only buildings are considered, or at least everything with a fixed footprint.
maybe you should clarify what you want to achieve with this trigger. what is the gameplay aspect of it. what happens with the spawned units after they killed the attacker? or asked different, why exactly do you need the pathing costs including certain units?
Hey guys, so I have a building set up that spawns and sends some units at the enemy if they're within a certain proximity (via triggers). Currently its just done by seeing if a unit is in a region surrounding the building. Because there's a lot of cliffs I was thinking maybe there'd be a better way to do it via pathing cost. It seems there's one pathing function that includes units in it, and one that disregards units completely. The disregarding units completely seems like it would be best, except it also disregards things such as rock barriers. Because this is a map that has a tug of war element to it, the first function can result in huge pathing cost values (especially if you use a point thats inside of an existing unit, although I was able to bypass that problem by using a function that searches for free space. Still, when there's lots of units in the way, I doubt this method will still work).
So is there a way to include certain units in the pathing calculation?
Any other suggestions?
@MaskedImposter: Go
i think only buildings are considered, or at least everything with a fixed footprint.
maybe you should clarify what you want to achieve with this trigger. what is the gameplay aspect of it. what happens with the spawned units after they killed the attacker? or asked different, why exactly do you need the pathing costs including certain units?
and ofc you could always implement your own path finding algo ( http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm), that is able to inlcude everything but will cost some cpu.