Looks like your part way there. You'll actually not want to use a trigger at all. First you have to assign each of the regions to an integer in a global array in your init trigger; there is no way around this, you have to predefine it. Then instead of using a "unit enters" event and trigger, create a custom action definition that runs a loop everyone once in a while like .1 sec and check if the unit in the region within an integer loop.
When I want your opinion...I'll give it to you!

nooblark Regular ShmoeHey guys,
I want to start off by saying I do not, sadly, know any languages. I am however, familair with 'how' they are written. With that being said:
I want a trigger to fire when a unit enters a region.. but not just one region, 50+ different ones. I assume the easiest way to do this is with a function (such as blizzard's triggering(player, region, unit), but I can't seem to figure out how to do it efficiently (to keep the map size/load small).
Here's an example:
Events:
Unit - Any unit enters (region)
Do actions.
But, because I have a bunch of regions, let's call them Region1-50, the only way I've found to do it is as follows:
Events:
Unit - Any unit enters (Region1)
Unit - Any unit enters (Region2)
Unit - Any unit enters (Region3)
etc
Do actions.
For the latter example, I have a global variable I predefined (50 times, ugh) to an array myArrayRegions[].
In my code, I added a for loop to help save a bunch of triggers, it looks like this:
Events:
Unit - Any unit enters (Region1)
Unit - Any unit enters (Region2)
Unit - Any unit enters (Region3)
etc
Actions:
For i 1 to 50 with increment 1, do actions.
Actions:
if Triggering Region = myArrayRegions[i]
Do actions.
This code sucessfully checks that the unit that entered one of the 50 listed regions is equal to one of the regions listed, then executes the code. I scripted it like this, because I thought it would be more efficient than writing 50 triggers (one for each region)
Which brings me to my problem..
I would love a function that I can use for this map (and any other ones I make), that assigns the variables' values. i.e
for i 1 to 50 with increment 1
myArrayRegions[i] = RegionFromId(i); //assuming I know the specific region Id, and can edit them to be incremental of eachother.
That should declare my array to all the regions for me. With two simple for loops, one declaring my variables in the array, and one checking if they are equal to a triggered region, I would save a lot of triggers.
I'm also all ears to find another way to do actions when a unit may enter a large quanity of regions.
I hope this makes sense, and I hope someone else finds this useful.
Thanks in advance,
-nooblark
**EDIT**
I would ideally love a function that sets my variables with a loop.
A bonus would be some way of calling that array (with all its values ( [1] - [50] ), as one event.