• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

How can I check if there is a possible path between 2 points?

Status
Not open for further replies.
Not easily. This was why Blizzard added a native to StarCraft II to do such calculation.

You can try the snippet above, which I assume does some sort of path finder logic. Another approach is to order a unit down a path and check if it gets stuck along the way. The issue with such an approach is the unit is limited to maximum unit movement speed so might take some time to walk down long paths.
 
I don't get it, what do these functions?
vJASS:
function IsPathBlocked takes unit obstruction returns boolean
    // Determines whether or not there is a path after a new unit is placed

function LoadPathingMap takes nothing returns nothing
    // Loads pathing for map
    // Call before using system
 
I don't get it, what do these functions?
Top function looks like it is intended for maze tower defences. It seems like it should detect if the placed building, obstruction fragments the pathing map.

Bottom function seems to be an initialisation function. It should be called once before using the system. It likely loads in the current pathing map state.
 
Top function looks like it is intended for maze tower defences. It seems like it should detect if the placed building, obstruction fragments the pathing map.

Bottom function seems to be an initialisation function. It should be called once before using the system. It likely loads in the current pathing map state.
Very well, thanks, but where is the function that tells me if 2 points can have a path?
 
Status
Not open for further replies.
Back
Top