Lightstalker
New Member
- Reaction score
- 55
The following does not work:
Here is the whole trigger: (which works, except for the above)
+rep to whoever can fix it
Trigger:
- Set Defeat_Force[1] = (All allies of (Owner of (Triggering unit)))
- Player Group - Pick every player in Defeat_Force[1] and do (Actions)
- Loop - Actions
- Player - Make (Picked player) treat (Owner of (Killing unit)) as an Ally with shared vision and shared units
- Player - Make (Owner of (Killing unit)) treat (Picked player) as an Ally with shared vision
- Loop - Actions
- Player Group - Pick every player in Defeat_Force[1] and do (Actions)
Here is the whole trigger: (which works, except for the above)
Trigger:
- Defeat
- Events
- Unit - A unit Dies
- Conditions
- Or - Any (Conditions) are true
- Conditions
- ((Triggering unit) is A Hero) Equal to True
- (Unit-type of (Triggering unit)) Equal to Imperial Palace
- Conditions
- Or - Any (Conditions) are true
- Actions
- Set Defeat_Force[0] = (Player group((Owner of (Triggering unit))))
- Set Defeat_Force[1] = (All allies of (Owner of (Triggering unit)))
- Player Group - Pick every player in Defeat_Force[1] and do (Actions)
- Loop - Actions
- Player - Make (Picked player) treat (Owner of (Killing unit)) as an Ally with shared vision and shared units
- Player - Make (Owner of (Killing unit)) treat (Picked player) as an Ally with shared vision
- Loop - Actions
- Set Defeat_Group = (Units owned by (Owner of (Triggering unit)))
- Game - Display to (All players) for 15.00 seconds the text: |cffFF0000|r
- Game - Display to (All players) for 10.00 seconds the text: (PlayerColors_String[(Player number of (Owner of (Triggering unit)))] + ((Name of (Owner of (Triggering unit))) + |r |cffFF0000has been defeated.|r))
- Game - Display to Defeat_Force[0] for 15.00 seconds the text: |cff32CD32 You may...
- Unit - Remove Emperor_Unit[(Player number of (Owner of (Triggering unit)))] from the game
- For each (Integer A) from 0 to 2, do (Actions)
- Loop - Actions
- Player - Limit training of RandomEmperor_Unit[(Integer A)] to 0 for (Owner of (Triggering unit))
- Player - Limit training of RandomEmperor_Unit[(Integer A)] to 0 for (Owner of (Killing unit))
- Loop - Actions
- Unit Group - Pick every unit in Defeat_Group and do (Actions)
- Loop - Actions
- Unit - Order (Picked unit) to Stop
- Loop - Actions
- Set Player_Value[(Player number of (Owner of (Triggering unit)))] = -1
- Set Player_Value[(Player number of (Owner of (Killing unit)))] = (Player_Value[(Player number of (Owner of (Killing unit)))] + 1)
- Player - Make (Owner of (Killing unit)) treat (Owner of (Triggering unit)) as an Ally with shared vision
- Player - Make (Owner of (Triggering unit)) treat (Owner of (Killing unit)) as an Ally with shared vision and shared units
- Player - Change color of (Owner of (Triggering unit)) to (Color of (Owner of (Killing unit))), Changing color of existing units
- Custom script: call DestroyForce(udg_Defeat_Force[0])
- Custom script: call DestroyForce(udg_Defeat_Force[1])
- Events
+rep to whoever can fix it