Actions not working

Lightstalker

New Member
Reaction score
55
The following does not work:
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


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
    • 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
      • 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))
      • Unit Group - Pick every unit in Defeat_Group and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Stop
      • 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])


+rep to whoever can fix it :)
 

GetTriggerUnit-

DogEntrepreneur
Reaction score
129
Oh, my mistake, didn't saw shared units.
You can't share units with an enemy. Set them allies before.

Says. "Pick every player allied to owner of dying unit.
Make allys of the dying player controlling the killing unit.

Impossible. They must be allied.
 

Lightstalker

New Member
Reaction score
55
Oh, my mistake, didn't saw shared units.
You can't share units with an enemy. Set them allies before.

Says. "Pick every player allied to owner of dying unit.
Make allys of the dying player controlling the killing unit.

Impossible. They must be allied.

What??? I'm making them allied AND giving them shared control at same time. In any case, I replaced it with "Pick every ally of X and make them ally with Y" followed by "pick every ally of X and share units with Y" and it still didn't work.
 

mr_fj

New Member
Reaction score
10
Upload the map. Then it's easier to see what the problem is.

Also, Does the player loose before or after this trigger? Try making it after, if it's not.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top