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

[Unit Enter Region Event] Detect if user enter any region of an region array.

Status
Not open for further replies.
Level 3
Joined
Jun 24, 2019
Messages
24
Hello everyone,
I am new to trigger editor and using GUI right now (not familiar with JASS/Lua tho :()
My question is simple,
Is there any easy way to detect if unit enters any regions of a given region array?
For example, I declared a global variable and initialized:

JavaScript:
myRegionArray = [region1, region2, ..., region100]

so we can detect once unit enter any one of those 100 regions.

The stupid but intuitive way I can come up with immediately, is create 100 triggers (OMG!) and each trigger has an event Unit Enters Region X. <= But it's too much work :(

Is there any good/effective way to solve this?

Thank you!
 
Status
Not open for further replies.
Top