• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

-Repick system

Status
Not open for further replies.
Level 13
Joined
Oct 27, 2008
Messages
1,176
Is there any other way to cut down on the size of the trigger or do I have to keep doing this for all 15 heroes on both sides?
I have it set that once a hero is picked it can't be pick again.
  • Repick
    • Events
      • Player - Player 1 (Red) types a chat message containing -Repick as An exact match
      • Player - Player 3 (Teal) types a chat message containing -Repick as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -Repick as An exact match
      • Player - Player 7 (Green) types a chat message containing -Repick as An exact match
      • Player - Player 9 (Gray) types a chat message containing -Repick as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HeroPlayer[(Player number of (Triggering player))] Equal to Bor Stonebreaker (Player)
        • Then - Actions
          • Unit - Remove HeroPlayerUnit[(Player number of (Triggering player))] from the game
          • Trigger - Turn on Berserker <gen>
          • Unit - Create 1 Hero Selection for (Triggering player) at (Center of TopRepick <gen>) facing Default building facing degrees
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HeroPlayer[(Player number of (Triggering player))] Equal to Kel'Thuzad (Player)
            • Then - Actions
              • Unit - Remove HeroPlayerUnit[(Player number of (Triggering player))] from the game
              • Trigger - Turn on Lich <gen>
              • Unit - Create 1 Hero Selection for (Triggering player) at (Center of TopRepick <gen>) facing Default building facing degrees
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HeroPlayer[(Player number of (Triggering player))] Equal to Jaina (Player)
                • Then - Actions
                  • Unit - Remove HeroPlayerUnit[(Player number of (Triggering player))] from the game
                  • Trigger - Turn on Mage <gen>
                  • Unit - Create 1 Hero Selection for (Triggering player) at (Center of TopRepick <gen>) facing Default building facing degrees
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • HeroPlayer[(Player number of (Triggering player))] Equal to Cenarius (Player)
                    • Then - Actions
                      • Unit - Remove HeroPlayerUnit[(Player number of (Triggering player))] from the game
                      • Trigger - Turn on Protector <gen>
                      • Unit - Create 1 Hero Selection for (Triggering player) at (Center of TopRepick <gen>) facing Default building facing degrees
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • HeroPlayer[(Player number of (Triggering player))] Equal to Tyrande (Player)
                        • Then - Actions
                          • Unit - Remove HeroPlayerUnit[(Player number of (Triggering player))] from the game
                          • Trigger - Turn on Shadow Caster <gen>
                          • Unit - Create 1 Hero Selection for (Triggering player) at (Center of TopRepick <gen>) facing Default building facing degrees
                        • Else - Actions
 
  • Events
    • Map Initialization
  • Actions
    • Set HeroTypes[1] = Berserker
    • Set HeroTypes[2] = blahblah
    • and so on
    • Set Triggers[1] = Berserker <gen>
    • and so on
  • Events
    • Player - Player 1 (Red) types a chat message containing -Repick as An exact match
    • Player - Player 2 (Blue) types a chat message containing -Repick as An exact match
  • Actions
    • Set UnitTypeOfHero = Unit-Type of HeroPlayer[(Player number of (Triggering player))]
    • For each (Integer X) from 1 to MaxNumberOfPlayers
      • Do - Actions
        • If-Then-Else
          • If - Conditions
            • UnitTypeOfHero is equal to HeroTypes[X]
          • Then - Actions
            • Unit - Remove HeroPlayerUnit[(Player number of (Triggering player))] from the game
            • Trigger - Turn on Trigger[X]
            • Unit - Create 1 Hero Selection for (Triggering player) at (Center of TopRepick <gen>) facing Default building facing degrees
 
Status
Not open for further replies.
Top