• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Assign Waygate to Only One Player

Status
Not open for further replies.

Deleted member 242951

D

Deleted member 242951

You need to make a custom doodad/ unit named waygate for that and then make the player units teleport through triggers.

Simple !!
 

EdgeOfChaos

E

EdgeOfChaos

Make a large region around the waygate that kicks out any unit not owned by that player.
 
Level 12
Joined
Nov 3, 2013
Messages
989
You need to make a custom doodad/ unit named waygate for that and then make the player units teleport through triggers.

Simple !!
Make a large region around the waygate that kicks out any unit not owned by that player.

Basically either one of these two are the most standard solutions, the first one won't consider the waygate's pathing and the second one could make units get stuck instead since they would think that there's a short cut without "knowing" that it's blocked for them.

If you really want the units to use the waygate automatically if it's a shortcut (or impossible to access normally) then what you could do is to have an event that fires when an move order is issued. If it's a square region compare the coordinates of the location to the min & max x & y. If the location is within the bounds and the unit that was issued the order is outside, order it to move to the fake waygate (Assuming it's owned by the right player.)

If it's circular then take the distance from what would be the center of the circle and the location and if it's not farther than the circle's radius then you order the units again like before.

Depending on the map you might have to do the same thing to let the units come back through the way gate.
 
Status
Not open for further replies.
Top