• 🏆 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!

Moving Unit to Nearest Region

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Yes. You can add all the possible teleport regions (assuming GUI rect) to an array. You can then linear search to find the one with the closest edge or origin to the position of entering unit in response to a unit enters region event.

Be aware the event works with regions (no GUI form) while GUI uses rect (GUI region).
 
Status
Not open for further replies.
Top