Multiple Trigger Problems
Iknow the problem in this trigger but i cant find a way to fix it here it is
What i figure the problem being is the ((Owner of (Random unit from Sheeps)) part. Sheeps is my unit group variable and if this helps at all this is how i have it set up
i have 8 units in the region sheeps added to the variable.
I have 2 problems with the trigger so here if the full thing.
The second problem i have is with the teleport part of the trigger. im guessing it has to do with the wait.
Iknow the problem in this trigger but i cant find a way to fix it here it is
Code:
If (((Player 1 (Red) slot status) Equal to Is playing) and (((Player 1 (Red) controller) Equal to User) and ((Owner of (Random unit from Sheeps)) Equal to Neutral Passive))) then do (Unit - Change ownership of (Random unit from Sheeps) to Player 1 (Red) and Change color) else do (Unit - Remove (Random unit from Sheeps) from the game)
What i figure the problem being is the ((Owner of (Random unit from Sheeps)) part. Sheeps is my unit group variable and if this helps at all this is how i have it set up
Code:
Sheeps
Events
Map initialization
Conditions
Actions
Unit Group - Pick every unit in (Units in Sheeps <gen>) and do (Actions)
Loop - Actions
Unit Group - Add (Picked unit) to Sheeps
i have 8 units in the region sheeps added to the variable.
I have 2 problems with the trigger so here if the full thing.
Code:
Sheep Spawn
Events
Time - Elapsed game time is 0.01 seconds
Conditions
Actions
If (((Player 1 (Red) slot status) Equal to Is playing) and (((Player 1 (Red) controller) Equal to User) and ((Owner of (Random unit from Sheeps)) Equal to Neutral Passive))) then do (Unit - Change ownership of (Random unit from Sheeps) to Player 1 (Red) and Change color) else do (Unit - Remove (Random unit from Sheeps) from the game)
If (((Player 2 (Blue) slot status) Equal to Is playing) and (((Player 2 (Blue) controller) Equal to User) and ((Owner of (Random unit from Sheeps)) Equal to Neutral Passive))) then do (Unit - Change ownership of (Random unit from Sheeps) to Player 2 (Blue) and Change color) else do (Unit - Remove (Random unit from Sheeps) from the game)
If (((Player 3 (Teal) slot status) Equal to Is playing) and (((Player 3 (Teal) controller) Equal to User) and ((Owner of (Random unit from Sheeps)) Equal to Neutral Passive))) then do (Unit - Change ownership of (Random unit from Sheeps) to Player 3 (Teal) and Change color) else do (Unit - Remove (Random unit from Sheeps) from the game)
If (((Player 4 (Purple) slot status) Equal to Is playing) and (((Player 4 (Purple) controller) Equal to User) and ((Owner of (Random unit from Sheeps)) Equal to Neutral Passive))) then do (Unit - Change ownership of (Random unit from Sheeps) to Player 4 (Purple) and Change color) else do (Unit - Remove (Random unit from Sheeps) from the game)
If (((Player 5 (Yellow) slot status) Equal to Is playing) and (((Player 5 (Yellow) controller) Equal to User) and ((Owner of (Random unit from Sheeps)) Equal to Neutral Passive))) then do (Unit - Change ownership of (Random unit from Sheeps) to Player 5 (Yellow) and Change color) else do (Unit - Remove (Random unit from Sheeps) from the game)
If (((Player 6 (Orange) slot status) Equal to Is playing) and (((Player 6 (Orange) controller) Equal to User) and ((Owner of (Random unit from Sheeps)) Equal to Neutral Passive))) then do (Unit - Change ownership of (Random unit from Sheeps) to Player 6 (Orange) and Change color) else do (Unit - Remove (Random unit from Sheeps) from the game)
If (((Player 7 (Green) slot status) Equal to Is playing) and (((Player 7 (Green) controller) Equal to User) and ((Owner of (Random unit from Sheeps)) Equal to Neutral Passive))) then do (Unit - Change ownership of (Random unit from Sheeps) to Player 7 (Green) and Change color) else do (Unit - Remove (Random unit from Sheeps) from the game)
If (((Player 8 (Pink) slot status) Equal to Is playing) and (((Player 8 (Pink) controller) Equal to User) and ((Owner of (Random unit from Sheeps)) Equal to Neutral Passive))) then do (Unit - Change ownership of (Random unit from Sheeps) to Player 8 (Pink) and Change color) else do (Unit - Remove (Random unit from Sheeps) from the game)
Wait 0.02 game-time seconds
Unit Group - Pick every unit in (Units in Sheeps <gen>) and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to (Center of (Playable map area))
The second problem i have is with the teleport part of the trigger. im guessing it has to do with the wait.