[Trigger] Shared Upgrades

Status
Not open for further replies.
Level 3
Joined
Dec 1, 2008
Messages
27
Im trying to create a trigger where if player 1 finishes an upgrade. Player 11 also gets it because they are allys. Thanks
 
If you want all allies of player 1 to get the upgrade:

  • Upgrade
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • (Researched tech-type) Equal to Your Upgrade
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • For each (Integer A) from 2 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Triggering unit)) is an ally of (Player((Integer A)))) Equal to True
            • Then - Actions
              • Player - Set the current research level of (Researched tech-type) to (Current research level of (Researched tech-type) for (Owner of (Triggering unit))) for (Player((Integer A)))
            • Else - Actions
Just player 11, if they are allies:
  • Upgrade
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • (Researched tech-type) Equal to Your Upgrade
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) is an ally of Player 11 (Dark Green)) Equal to True
        • Then - Actions
          • Player - Set the current research level of (Researched tech-type) to (Current research level of (Researched tech-type) for (Owner of (Triggering unit))) for Player 11 (Dark Green)
        • Else - Actions
 
The triggering unit is the researching unit, it wouldn't make a difference.
 
Status
Not open for further replies.
Back
Top