- Joined
- Sep 27, 2011
- Messages
- 141
Can someone Please help me fix the following trigger
The trigger is meant to increase resources when the worker unit is near them then remove the gold coin however nothing happens.
- Set Worker_Group = (Units in (Playable map area) matching (((Matching unit) is Undead) Equal to True))
-
Unit Group - Pick every unit in Worker_Group and do (Actions)
-
Loop - Actions
- Set Worker_Pos = (Position of (Picked unit))
- Set Gold_Coins_Group = (Units within 80.00 of Worker_Pos matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Gold Coin)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of (Picked unit)) is an ally of Player 1 (Red)) Equal to True
-
Then - Actions
- Set Resources[1] = (Resources[1] + (Number of units in Gold_Coins_Group))
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of (Picked unit)) is an ally of Player 6 (Orange)) Equal to True
-
Then - Actions
- Set Resources[2] = (Resources[2] + (Number of units in Gold_Coins_Group))
-
Else - Actions
- Do nothing
-
If - Conditions
-
For each (Integer A) from 1 to (Number of units in Gold_Coins_Group), do (Actions)
-
Loop - Actions
- Unit - Remove (Random unit from Gold_Coins_Group) from the game
-
Loop - Actions
-
Loop - Actions
- Custom script: call DestroyGroup(udg_Worker_Group)
- Custom script: call DestroyGroup(udg_Gold_Coins_Group)
- Custom script: call RemoveLocation(udg_Worker_Pos)
Last edited by a moderator: