1. Are you planning to upload your awesome map to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  5. Dismiss Notice
  6. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Viewer

DWARVEN WARS Ultimate v.28.w3x
Variables
Main
Initialization
Anti Team Attack
Player Leaves
Sieg
init colors
Strudel
Timer
Countdown
Multiboard
Multiboard Refresh
Hero
Hero XP
Gold
Income
Gold Upgrade
Barracks
Finish Barracks
Takeover
Farms
Nahrung berechnen
Farm Takeover
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.

		
Name Type Is Array Initial Value
AbstimmungA integer No
AbstimmungB integer No
goldincome integer Yes 20
PlayerColorCode string Yes
PlayerColorString string Yes
PlayerHasVoted boolean Yes
PlayerIsWinner boolean No
playerkills integer Yes
takeoverplayer player No
Timer timer No
Timer_Window timerdialog No
WinningPlayer player No
Default melee game initialization for all players
Initialization
  Events
    Time - Elapsed game time is 0.00 seconds
  Conditions
  Actions
    Trigger - Run init_colors <gen> (checking conditions)
    Trigger - Run (checking conditions)
    For each (Integer A) from 1 to 12, do (Actions)
      Loop - Actions
        Unit - Create 1.mobile main for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
        Player - Set (Player((Integer A))).Current lumber to 100
        Player - Set (Player((Integer A))).Current gold to 50
        Player - Limit training of Dwarven Main to 1 for (Player((Integer A)))
        Player - Limit training of Canontower to 6 for (Player((Integer A)))
        Player - Limit training of Leader to 1 for (Player((Integer A)))
        Player - Limit training of Last Elite Sniper to 1 for (Player((Integer A)))
        Player - Limit training of Dwarven Paladin to 1 for (Player((Integer A)))
        Player - Turn Gives bounty On for (Player((Integer A)))
    Quest - Create a Required quest titled How to play Dwarven Wars with the description At first build your Dwarven Main. Choose a place somewhere save on the map, where you can defend it against your enemies.Upgrade your income in main by using gold upgrade.DO NOT LEAVE GAME IT ALWAYS CONTINUESDwarven Ground Units:Dwarven Melee:effective vs: Dwarven Sniper, Siege Dwarfineffective vs: Dwarven Armour plateDwarven Sniper: effective vs: Siege Dwarfineffective vs: Dwarven LeaderSiege Dwarf: effective vs: Dwarven leader and buildingsineffective vs: Dwarven Sniper, Dwarven femaleDwarven Special units:Dwarven Armour plate:effective vs: Dwarven Leader, Dwarven female, Dwarven Sniperineffective vs: Siege DwarfArtellery:effective vs: buildings, Dwarven Leaderineffective vs: the rest, using icon path ReplaceableTextures\CommandButtons\BTNSelectHeroOn.blp
Anti Team Attack
  Events
    Unit - A unit Is attacked
  Conditions
    (Color of (Owner of (Attacked unit))) Equal to (Color of (Owner of (Attacking unit)))
    (Owner of (Attacked unit)) Not equal to (Owner of (Attacking unit))
  Actions
    Unit - Order (Attacking unit) to Stop.
Player Leaves
  Events
    Player - Player 1 (Red) leaves the game
    Player - Player 2 (Blue) leaves the game
    Player - Player 3 (Teal) leaves the game
    Player - Player 4 (Purple) leaves the game
    Player - Player 5 (Yellow) leaves the game
    Player - Player 6 (Orange) leaves the game
    Player - Player 7 (Green) leaves the game
    Player - Player 8 (Pink) leaves the game
    Player - Player 9 (Gray) leaves the game
    Player - Player 10 (Light Blue) leaves the game
    Player - Player 11 (Dark Green) leaves the game
    Player - Player 12 (Brown) leaves the game
  Conditions
  Actions
    For each (Integer A) from 1 to 12, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Color of (Player((Integer A)))) Equal to (Color of (Triggering player))
            (Triggering player) Not equal to (Player((Integer A)))
          Then - Actions
            Unit Group - Pick every unit in (Units owned by (Triggering player) of type Farm (increase by 5)) and do (Actions)
              Loop - Actions
                Unit - Change ownership of (Picked unit) to (Player((Integer A))) and Change color
          Else - Actions
    Unit Group - Pick every unit in (Units owned by (Triggering player) of type Farm (increase by 5)) and do (Actions)
      Loop - Actions
        Unit - Change ownership of (Picked unit) to Neutral Hostile and Change color
    Unit Group - Pick every unit in (Units owned by (Triggering player).) and do (Actions)
      Loop - Actions
        Unit - Remove (Picked unit) from the game
    Game - Display to (All players) for 15.00 seconds the text: (PlayerColorCode[(Player number of (Triggering player))] + ((Name of (Triggering player)) + left the game!))
    Wait 0.01 seconds
    -------- Multiboard --------
    Trigger - Run Multiboard_Refresh <gen> (ignoring conditions)
    -------- Nahrung berechnen --------
    Trigger - Run Nahrung_berechnen <gen> (checking conditions)
    -------- Sieg --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        PlayerIsWinner Equal to False
      Then - Actions
        Trigger - Run Sieg <gen> (checking conditions)
      Else - Actions
Sieg
  Events
  Conditions
  Actions
    For each (Integer A) from 1 to 12, do (Actions)
      Loop - Actions
        Set VariableSet PlayerIsWinner = True
        Unit Group - Pick every unit in (Units of type Dwarven Main) and do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Color of (Player((Integer A)))) Not equal to (Color of (Owner of (Picked unit)))
              Then - Actions
                Set VariableSet PlayerIsWinner = False
              Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            PlayerIsWinner Equal to True
          Then - Actions
            Trigger - Turn off (This trigger)
            Set VariableSet WinningPlayer = (Player((Integer A)))
            Game - Display to (All players) the text: ( + (PlayerColorCode[(Player number of WinningPlayer)] + (PlayerColorString[(Player number of WinningPlayer)] + owned you all!)))
            Game - Display to (All players) the text: X_Falkenauge_X says thank you to all players and wishes a lot of fun with following vers!Then the war of the dwarfes is not over yet!
            Skip remaining actions
          Else - Actions
init colors
  Events
  Conditions
  Actions
    -------- Set Colorcodes --------
    Set VariableSet PlayerColorCode[1] = |cffFF0202
    Set VariableSet PlayerColorCode[2] = PlayerColorCode[1]
    Player - Change color of Player 2 (Blue) to Red, Changing color of existing units
    Set VariableSet PlayerColorCode[3] = |cff1BE6B8
    Set VariableSet PlayerColorCode[4] = PlayerColorCode[3]
    Player - Change color of Player 4 (Purple) to Teal, Changing color of existing units
    Set VariableSet PlayerColorCode[5] = |cffFFFC00
    Set VariableSet PlayerColorCode[6] = PlayerColorCode[5]
    Player - Change color of Player 6 (Orange) to Yellow, Changing color of existing units
    Set VariableSet PlayerColorCode[7] = |cff1FBF00
    Set VariableSet PlayerColorCode[8] = PlayerColorCode[7]
    Player - Change color of Player 8 (Pink) to Green, Changing color of existing units
    Set VariableSet PlayerColorCode[9] = |cff949596
    Set VariableSet PlayerColorCode[10] = PlayerColorCode[9]
    Player - Change color of Player 10 (Light Blue) to Gray, Changing color of existing units
    Set VariableSet PlayerColorCode[11] = |cff0F6145
    Set VariableSet PlayerColorCode[12] = PlayerColorCode[11]
    Player - Change color of Player 12 (Brown) to Dark Green, Changing color of existing units
    -------- Set Colorstrings --------
    Set VariableSet PlayerColorString[1] = Rot
    Set VariableSet PlayerColorString[2] = PlayerColorString[1]
    Set VariableSet PlayerColorString[3] = Türkis
    Set VariableSet PlayerColorString[4] = PlayerColorString[3]
    Set VariableSet PlayerColorString[5] = Gelb
    Set VariableSet PlayerColorString[6] = PlayerColorString[5]
    Set VariableSet PlayerColorString[7] = Grün
    Set VariableSet PlayerColorString[8] = PlayerColorString[7]
    Set VariableSet PlayerColorString[9] = Grau
    Set VariableSet PlayerColorString[10] = PlayerColorString[9]
    Set VariableSet PlayerColorString[11] = Dunkelgrün
    Set VariableSet PlayerColorString[12] = PlayerColorString[11]
Strudel
  Events
    Unit - A unit enters StrudelEingang <gen>
  Conditions
    ((Entering unit) is A flying unit) Equal to False
  Actions
    Unit - Move (Entering unit) instantly to (Random point in StrudelAusgang <gen>)
Countdown
  Events
    Time - Elapsed game time is 0.00 seconds
  Conditions
  Actions
    Countdown Timer - Start (Last started timer) as a Repeating timer that will expire in 20.00 seconds
    Countdown Timer - Create a timer window for (Last started timer) with title Income
    Countdown Timer - Change the color of the title for (Last created timer window) to (100%, 80%, 20%) with 0% transparency
    Countdown Timer - Show (Last created timer window)
Multiboard Refresh
  Events
  Conditions
  Actions
    For each (Integer B) from 1 to 12, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            ((Player((Integer B))) slot status) Equal to Is playing
          Then - Actions
            -------- Name --------
            Multiboard - Set the text for (Last created multiboard) item in column 1, row ((Integer B) + 1) to (PlayerColorCode[(Integer B)] + (Name of (Player((Integer B)))))
            -------- Gold --------
            Multiboard - Set the icon for (Last created multiboard) item in column 2, row ((Integer B) + 1) to ReplaceableTextures\CommandButtons\BTNChestOfGold.blp
            Multiboard - Set the text for (Last created multiboard) item in column 2, row ((Integer B) + 1) to (PlayerColorCode[(Integer B)] + (String(goldincome[(Integer B)])))
            -------- Kills --------
            Multiboard - Set the icon for (Last created multiboard) item in column 3, row ((Integer B) + 1) to ReplaceableTextures\CommandButtons\BTNSkeletonArcher.blp
            Multiboard - Set the text for (Last created multiboard) item in column 3, row ((Integer B) + 1) to (PlayerColorCode[(Integer B)] + (String(playerkills[(Integer B)])))
          Else - Actions
            Multiboard - Set the text for (Last created multiboard) item in column 1, row ((Integer B) + 1) to |cff272727---|r
            Multiboard - Set the text for (Last created multiboard) item in column 2, row ((Integer B) + 1) to |cff272727---|r
            Multiboard - Set the text for (Last created multiboard) item in column 3, row ((Integer B) + 1) to |cff272727---|r
Hero XP
  Events
    Unit - A unit Dies
  Conditions
    ((Killing unit) is A Hero) Equal to True
    ((Dying unit) is A structure) Equal to False
    (Color of (Owner of (Killing unit))) Not equal to (Color of (Owner of (Dying unit)))
  Actions
    Hero - Add 1 experience to (Killing unit), Hide level-up graphics
    Unit - Set level of Powerful Shot for (Killing unit) to (Hero level of (Killing unit))
    Unit - Set level of Stronger Armor for (Killing unit) to (Hero level of (Killing unit))
Income
  Events
    Time - Every 20.00 seconds of game time
  Conditions
  Actions
    For each (Integer A) from 1 to 12, do (Actions)
      Loop - Actions
        Player - Add goldincome[(Integer A)] to (Player((Integer A))).Current gold
Gold Upgrade
  Events
    Unit - A unit enters (Entire map)
  Conditions
    (Unit-type of (Entering unit)) Equal to Gold Upgrade
  Actions
    Set VariableSet goldincome[(Player number of (Owner of (Entering unit)))] = (goldincome[(Player number of (Owner of (Entering unit)))] + 5)
    Multiboard - Set the text for (Last created multiboard) item in column 2, row ((Player number of (Owner of (Entering unit))) + 1) to (PlayerColorCode[(Player number of (Owner of (Entering unit)))] + (String(goldincome[(Player number of (Owner of (Entering unit)))])))
    Unit - Remove (Entering unit) from the game
Finish Barracks
  Events
    Unit - A unit Finishes construction
  Conditions
    (Unit-type of (Constructed structure)) Equal to Dwarven Main
  Actions
    Unit - Explode (Random unit from (Units owned by (Owner of (Constructed structure)) of type mobile main)).
    Trigger - Add to Takeover <gen> the event ((Constructed structure) Takes damage)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Number of units in (Units in (Playable map area) matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Dwarven Main)))) Greater than or equal to 2
      Then - Actions
        Trigger - Turn on Sieg <gen>
      Else - Actions
Takeover
  Events
  Conditions
    (Unit-type of (Attacked unit)) Equal to Dwarven Main
    (Life of (Attacked unit)) Less than or equal to ((Max life of (Attacked unit)) / 4.00)
  Actions
    Set VariableSet takeoverplayer = (Owner of (Damage source))
    Unit - Set life of (Attacked unit) to 100%
    Player - Change color of (Owner of (Attacked unit)) to (Color of takeoverplayer), Changing color of existing units
    Set VariableSet PlayerColorCode[(Player number of (Owner of (Attacked unit)))] = PlayerColorCode[(Player number of takeoverplayer)]
    Set VariableSet PlayerColorString[(Player number of (Owner of (Attacked unit)))] = PlayerColorString[(Player number of takeoverplayer)]
    For each (Integer A) from 1 to 12, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Color of takeoverplayer) Equal to (Color of (Player((Integer A))))
          Then - Actions
            Player - Make (Owner of (Attacked unit)) treat (Player((Integer A))) as an Ally with shared vision
            Player - Make (Player((Integer A))) treat (Owner of (Attacked unit)) as an Ally with shared vision
          Else - Actions
            Player - Make (Owner of (Attacked unit)) treat (Player((Integer A))) as an Enemy
            Player - Make (Player((Integer A))) treat (Owner of (Attacked unit)) as an Enemy
    -------- Multiboard --------
    Trigger - Run Multiboard_Refresh <gen> (checking conditions)
    -------- Nahrung berechnen --------
    Trigger - Run Nahrung_berechnen <gen> (checking conditions)
    -------- Sieg --------
    Trigger - Run Sieg <gen> (checking conditions)
Nahrung berechnen
  Events
  Conditions
  Actions
    For each (Integer A) from 1 to 12, do (Actions)
      Loop - Actions
        Player - Set (Player((Integer A))).Food cap to 60
        For each (Integer B) from 1 to 12, do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Color of (Player((Integer B)))) Equal to (Color of (Player((Integer A))))
              Then - Actions
                Player - Add ((Number of living Farm (increase by 5) units owned by (Player((Integer B)))) x 5) to (Player((Integer A))).Food cap
              Else - Actions
Farm Takeover
  Events
    Unit - Farm (increase by 5) 0015 <gen> Takes damage
    Unit - Farm (increase by 5) 0014 <gen> Takes damage
    Unit - Farm (increase by 5) 0018 <gen> Takes damage
    Unit - Farm (increase by 5) 0017 <gen> Takes damage
    Unit - Farm (increase by 5) 0016 <gen> Takes damage
    Unit - Farm (increase by 5) 0024 <gen> Takes damage
    Unit - Farm (increase by 5) 0007 <gen> Takes damage
    Unit - Farm (increase by 5) 0052 <gen> Takes damage
    Unit - Farm (increase by 5) 0054 <gen> Takes damage
    Unit - Farm (increase by 5) 0053 <gen> Takes damage
  Conditions
    (Unit-type of (Attacked unit)) Equal to Farm (increase by 5)
    (Life of (Attacked unit)) Less than or equal to ((Max life of (Attacked unit)) / 2.00)
  Actions
    Set VariableSet takeoverplayer = (Owner of (Damage source))
    Unit - Set life of (Attacked unit) to 100%
    Unit - Change ownership of (Attacked unit) to takeoverplayer and Change color
    Set VariableSet PlayerColorCode[(Player number of (Owner of (Attacked unit)))] = PlayerColorCode[(Player number of takeoverplayer)]
    For each (Integer A) from 1 to 12, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Color of takeoverplayer) Equal to (Color of (Player((Integer A))))
          Then - Actions
            Player - Make (Owner of (Attacked unit)) treat (Player((Integer A))) as an Ally with shared vision
            Player - Make (Player((Integer A))) treat (Owner of (Attacked unit)) as an Ally with shared vision
          Else - Actions
            Player - Make (Owner of (Attacked unit)) treat (Player((Integer A))) as an Enemy
            Player - Make (Player((Integer A))) treat (Owner of (Attacked unit)) as an Enemy
    -------- Nahrung berechnen --------
    Trigger - Run Nahrung_berechnen <gen> (checking conditions)