• 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.

Waygate weirdness

Status
Not open for further replies.
Level 26
Joined
Aug 18, 2009
Messages
4,097
A waygate connects a source rect of the map to a target point, therefore forming additional path finding options for units. If they find that a destination is closer by taking the waygate (while being ordered), they will go for it.

Now what happens if the unit departs from its path to the waygate without noticing? This happens when you move it via SetUnitX/Y. The unit will still aim for the waygate even if the final target is easier to reach by foot now, and even if the waygate itself is not accessible anymore.

Without further change of the map's pathing, I came across different scenarios that may take place:

1. The unit tries to reach the (inaccessible) gate but then gives up, retreats/picks new route.

1b. The unit tries to reach the (accessible) gate but then gives up, retreats/picks new route.

for 1) use waygate with warp ability with width/height = 0

2. The unit tries to reach the (inaccessible) gate, then gives up and forces the teleport even if it is not within the gate's range.

2b. The unit tries to reach the (accessible) gate, gives up midway and forces teleport.

for 2) use waygate with warp ability with width/height > 0

3. The unit takes the (accessible) gate, although it's the longer path.

See attached map, try to order the knight from its initial position to its corresponding stone area below it.
 

Attachments

  • waygateWin.w3x
    21.9 KB · Views: 67
Status
Not open for further replies.
Top