Right now my map has about 70 regions where hostile units spawn for the players to kill. I want to "leash" them so that players can't lure them back to their base.
To do this I have a trigger set up like this:
Event:
Any Unit Leaves Region REGION
Actions:
If Triggering Unit belongs to CREEP_COMPUTER,
Issue Order
Triggering Unit Move to Center Of Triggering Region
This works fine if I have the Region as a value, but 99% of my Regions are stored in variables and they don't show up when I look for them in the Event section. I can access the variable in the "action" section, but not the "event" section. Has anybody encountered this problem and/or have a solution?
You simply cannot select region variables to register for an event in Gui, because the events are registered at map initialization internally, while the variables might be set later on.
You can either select the regions one by one for the events, or you can use galaxy / custom script, which allows you to dynamically register events and use variables.
Got it thanks. Here's the basic layout for all future viewers.
Replace "LeashPlayer9" with the name of the trigger I mentioned in the Original Post.
Replace "zones[1][1]" with whatever variable you wanted to use but hasn't been created yet.
Right now my map has about 70 regions where hostile units spawn for the players to kill. I want to "leash" them so that players can't lure them back to their base.
To do this I have a trigger set up like this:
Event: Any Unit Leaves Region REGION
Actions: If Triggering Unit belongs to CREEP_COMPUTER, Issue Order Triggering Unit Move to Center Of Triggering Region
This works fine if I have the Region as a value, but 99% of my Regions are stored in variables and they don't show up when I look for them in the Event section. I can access the variable in the "action" section, but not the "event" section. Has anybody encountered this problem and/or have a solution?
You simply cannot select region variables to register for an event in Gui, because the events are registered at map initialization internally, while the variables might be set later on.
You can either select the regions one by one for the events, or you can use galaxy / custom script, which allows you to dynamically register events and use variables.
Got it thanks. Here's the basic layout for all future viewers.
Replace "LeashPlayer9" with the name of the trigger I mentioned in the Original Post.
Replace "zones[1][1]" with whatever variable you wanted to use but hasn't been created yet.