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

King of the Hill Region Events

Status
Not open for further replies.
Level 13
Joined
Oct 16, 2010
Messages
731
Hi,

I've recently come across an issue when trying to create a "King of the Hill" gamemode, where the hill (region) is periodically moved to a random location.

My issue is that unit enters and leaves events don't follow the region when it's moved, I have looked this up online and this is a known fact apparently! My issue now is trying to work out how to solve this or at least make a workaround for this... I like the idea of having the regions move randomly but could settle for specific locations if need be (I know this would just be making numerous triggers for each region, not the end of the world)

"Unit enters range" could be an alternative but I'm not sure the best way to notice if a unit leaves range? Maybe a periodic check?

Any suggestions would be much appreciated :)
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,555
You can always rely on something other than regions. Like a trigger with a Periodic Interval that checks for nearby units and adds them to a unit group. You can then enumerate over the group and check the distances of the units inside to see if they're still within hill range. If they aren't then remove them from the group.
 
Status
Not open for further replies.
Top