Simplifying Trigger/Combining Triggers

CuteCumber

Member
Reaction score
4
I made a unit revive trigger like this:
Trigger:
  • Revive P1
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to (==) Peasant (Human)
      • ((Triggering unit) is owned by Player 2 (Blue)) Equal to (==) True
    • Actions
      • Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set P1Item[(Integer A)] = (Item carried by (Triggering unit) in slot (Integer A))
      • Wait 10.00 game-time seconds
      • Unit - Create 1 Peasant (Human) for Player 2 (Blue) at HumanRevivePoint facing Default building facing (270.0) degrees
        • Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
          • Loop - Actions
            • Hero - Give (Last created item) to (Last created unit)
            • Item - Create (Item-type of P1Item[(Integer A)]) at HumanRevivePoint
      • Unit - Remove (Triggering unit) from the game
      • Camera - Pan camera for (Owner of (Last created unit)) to HumanRevivePoint over 0.00 seconds
      • Selection - Select (Last created unit) for (Owner of (Last created unit))


I made it one by one for all the other players. This means I got 10 similar triggers in total. Can this be simplified or combined? Thank you.
 

DrEvil

FCRI Associate!
Reaction score
111
Trigger:
  • Revive P1
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to (==) Peasant (Human)
      • ((Triggering unit) is owned by Player 2 (Blue)) Equal to (==) True
      • /// add the same conditions for all the other players
    • Actions
      • Wait 10.00 game-time seconds
      • Unit - Create 1 Peasant (Human) for (TriggeringPlayer) at HumanRevivePoint facing Default building facing (270.0) degrees
        • Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
          • Loop - Actions
            • Item - Create (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) at HumanRevivePoint
            • Hero - Give (Last created item) to (Last created unit)
      • Unit - Remove (Triggering unit) from the game
      • Camera - Pan camera for (Owner of (Last created unit)) to HumanRevivePoint over 0.00 seconds
      • Selection - Select (Last created unit) for (Owner of (Last created unit))


I think that should work
which then makes it MUI because of no variables being overwriten
 
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