• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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: 66
Status
Not open for further replies.
Top