My map starts with 2 neutral transporters bringing in my hero and 3 berserkers. When the Transporter unloads i want the trigger to change the owner to player 1, including the berserkers.
The main problem i currently have is that i cant seem to find a way to change the "any unit" into my specific hero and/or the beserkers.
I even skipt the part with the transporters and started with me alrdy owning my hero, but when i want to create a "hero enters xxx region" trigger i always encounter the problem with the "any unit" only option.
Is there any way to define a varible or anything else so i can just choose my hero from a list to make triggers work proberbly?
1. Add a condition to the Any-unit-enters trigger that checks if the entering unit is of unit type zealot (I think that's what you mean by berserker ^.^) or your hero.
2. Make variables for the hero and zealots and use "<myVariableHero> enters region". But that probably won't work unless you add the event through another triggers since the variables are empty at the time the event gets linked to the trigger.
If the case is that you made a trigger that loads the transport with the specific units at the map initialization and Issue orders the dropship to Unload at the target location, then option 1 s3rius metioned is easier in my opinion.
Make a new global variable (it should appear on the left side of the trigger window) change it into type unit group and name it something appropriately, let's say unitgroupForces
Every time you make the action "Create cargo for Dropship etc." create a new action immediately after it: Add last created cargo units to unitgroupForces
When the dropship lands and you want the unit to change ownership make this action:
ACTION - Pick every unit in unitgroupForces and do: Change ownership of picked unit to Player 1
As I don't think unloading in a region counts as entering.
Hey guys,
i just finished designing my map terrain.
Now i run into this problem:
My map starts with 2 neutral transporters bringing in my hero and 3 berserkers. When the Transporter unloads i want the trigger to change the owner to player 1, including the berserkers.
The main problem i currently have is that i cant seem to find a way to change the "any unit" into my specific hero and/or the beserkers.
I even skipt the part with the transporters and started with me alrdy owning my hero, but when i want to create a "hero enters xxx region" trigger i always encounter the problem with the "any unit" only option.
Is there any way to define a varible or anything else so i can just choose my hero from a list to make triggers work proberbly?
THX for any help, im stuck :)
You could do one out of two things:
1. Add a condition to the Any-unit-enters trigger that checks if the entering unit is of unit type zealot (I think that's what you mean by berserker ^.^) or your hero.
2. Make variables for the hero and zealots and use "<myVariableHero> enters region". But that probably won't work unless you add the event through another triggers since the variables are empty at the time the event gets linked to the trigger.
So my tip is to use method #1.
If the case is that you made a trigger that loads the transport with the specific units at the map initialization and Issue orders the dropship to Unload at the target location, then option 1 s3rius metioned is easier in my opinion.
Make a new global variable (it should appear on the left side of the trigger window) change it into type unit group and name it something appropriately, let's say unitgroupForces
Every time you make the action "Create cargo for Dropship etc." create a new action immediately after it: Add last created cargo units to unitgroupForces
When the dropship lands and you want the unit to change ownership make this action:
ACTION - Pick every unit in unitgroupForces and do: Change ownership of picked unit to Player 1
As I don't think unloading in a region counts as entering.
thx to both of you.
solved :)