• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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
 
Level 10
Joined
Jan 21, 2007
Messages
576
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
 
Level 10
Joined
Jan 21, 2007
Messages
576
The triggering unit is the researching unit, it wouldn't make a difference.
 
Status
Not open for further replies.
Top