• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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