1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  6. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  7. Shoot to thrill, play to kill. Sate your hunger with the 33rd Modeling Contest!
    Dismiss Notice
  8. 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

UGHPS 2.3.w3x
Variables
UGHPS
HOW TO IMPORT
Setup
UGHPS Setup
Camera
UGHPS Camera
UGHPS Camera x
Settings
Interface Human
Interface Orc
Interface Night Elf
Interface Undead
Progress
UGHPS Progress
UGHPS Buttons
This Map Only
Temp Trigger
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
AGHPS_HeroModel destructable Yes
Integer_c integer No
Integer_h integer No
Integer_i integer No
Integer_k integer No
point_p location No
TextColor string Yes
UGHPS_Button_OK unit No
UGHPS_Button_Random unit No
UGHPS_Camera camerasetup Yes
UGHPS_CameraCheck boolean Yes
UGHPS_CameraTimer timer Yes
UGHPS_FT texttag Yes
UGHPS_HERO_H unitcode Yes
UGHPS_HeroModel destructable Yes
UGHPS_HeroStats location Yes
UGHPS_InterfaceRegion rect Yes
UGHPS_Sound sound Yes
UGHPS_StringAttributes string Yes
UGHPS_TempForce force No
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Ultimate GUI Hero Pick System 2.3
// Created by -Kobas-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// 1. Export and then import into your map all imported resources.
// 2. Copy all Object Editor data
// 3. Create your own interface on the map somewhere
// 4. Copy Trigger data
// 5. Check each trigger, fallow instructions and edit data
// 6. Enjoy
//
// www.hiveworkshop.com
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
WARNING:
Variable that is used for damage (string) should be same like variable used for damage (point).
Set UGHPS_HeroStats[(Integer_i + (Integer_k + 1))] = (Center of Damage 2 <gen>)
Set UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 1))] = |cFF00FF00IIIIIII|r|cFFFF0000III|r

that "+ number" should be same to precise :)
UGHPS Setup
  Events
    Map initialization
  Conditions
  Actions
    -------- Player Colors --------
    Set VariableSet TextColor[1] = |c00FF0000
    Set VariableSet TextColor[2] = |c000042FF
    Set VariableSet TextColor[3] = |c001CE6B9
    Set VariableSet TextColor[4] = |c00540081
    Set VariableSet TextColor[5] = |c00FFFC01
    Set VariableSet TextColor[6] = |c00FEBA0E
    Set VariableSet TextColor[7] = |c0020C000
    Set VariableSet TextColor[8] = |c00E55BB0
    Set VariableSet TextColor[9] = |c00959697
    Set VariableSet TextColor[11] = |c00FFFFBB
    Set VariableSet TextColor[12] = |c00FF00FF
    -------- Player Interface Regions --------
    Set VariableSet UGHPS_InterfaceRegion[1] = __Player_Interface_1 <gen>
    Set VariableSet UGHPS_InterfaceRegion[2] = __Player_Interface_2 <gen>
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- Red Player --------
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- Player multipli value, should be ranged from 100 to 800. Everything above 800 will ruin trigger cuz max array limit will be reached. --------
    -------- I use 100 cuz 100 - 20 for each hero = 40 more room between. --------
    Set VariableSet Integer_i = 100
    -------- Integer that calculate things, it's easier for me to work like this, if you need different value you can just change 1 variable instead all. --------
    Set VariableSet Integer_k = 1
    -------- Interface Camera --------
    Set VariableSet UGHPS_Camera[1] = gg_cam_Interface_1
    -------- Damage --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 1))] = (Center of Damage_1 <gen>)
    -------- Range --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 2))] = (Center of Range_1 <gen>)
    -------- Armor --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 3))] = (Center of Armor_1 <gen>)
    -------- AoE --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 4))] = (Center of AoE_1 <gen>)
    -------- Support --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 5))] = (Center of Support_1 <gen>)
    -------- Regeneration --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 6))] = (Center of Regeneration_1 <gen>)
    -------- Hero Name --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 7))] = (Center of Hero_Name_1 <gen>)
    -------- Hero Class --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 8))] = (Center of Hero_1 <gen>)
    -------- Hero Introduction --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 9))] = (Center of Intro_1 <gen>)
    -------- Stats - Attributes --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 10))] = (Center of A_1 <gen>)
    -------- Hero Spawn Location --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 11))] = (Center of Spawn_Location_1 <gen>)
    -------- OK button --------
    Set VariableSet UGHPS_Button_OK = 0022 <gen>
    -------- Random Button --------
    Set VariableSet UGHPS_Button_Random = 0002 <gen>
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- Blue Player --------
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- Player multipli value, should be ranged from 100 to 800. Everything above 800 will ruin trigger cuz max array limit will be reached. --------
    -------- I use 100 cuz 100 - 20 for each hero = 40 more room between. --------
    Set VariableSet Integer_i = 200
    -------- Integer that calculate things, it's easier for me to work like this, if you need different value you can just change 1 variable instead all. --------
    Set VariableSet Integer_k = 1
    -------- Interface Camera --------
    Set VariableSet UGHPS_Camera[2] = gg_cam_Interface_2
    -------- Damage --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 1))] = (Center of Damage_2 <gen>)
    -------- Range --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 2))] = (Center of Range_2 <gen>)
    -------- Armor --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 3))] = (Center of Armor_2 <gen>)
    -------- AoE --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 4))] = (Center of AoE_2 <gen>)
    -------- Support --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 5))] = (Center of Support_2 <gen>)
    -------- Regeneration --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 6))] = (Center of Regeneration_2 <gen>)
    -------- Hero Name --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 7))] = (Center of Hero_Name_2 <gen>)
    -------- Hero Class --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 8))] = (Center of Hero_2 <gen>)
    -------- Hero Introduction --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 9))] = (Center of Intro_2 <gen>)
    -------- Stats - Attributes --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 10))] = (Center of A_2 <gen>)
    -------- Hero Spawn Location --------
    Set VariableSet UGHPS_HeroStats[(Integer_i + (Integer_k + 11))] = (Center of Spawn_Location_2 <gen>)
    -------- OK button --------
    Set VariableSet UGHPS_Button_OK = 0007 <gen>
    -------- Random Button --------
    Set VariableSet UGHPS_Button_Random = 0006 <gen>
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- MPI settings --------
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    For each (Integer A) from 1 to 2, do (Actions)
      Loop - Actions
        -------- Disable camera variable for all players --------
        Set VariableSet UGHPS_CameraCheck[(Player number of (Player((Integer A))))] = False
        -------- Add player select unit event to trigger below. --------
        Trigger - Add to UGHPS_Buttons <gen> the event ((Player((Integer A))) Selects a unit)
        -------- Add player skips cinematic or write xxx to right trigger. --------
        Trigger - Add to UGHPS_Progress <gen> the event ((Player((Integer A))) skips a cinematic sequence)
        Trigger - Add to UGHPS_Progress <gen> the event ((Player((Integer A))) types a chat message containing xxx (stringnoformat) as An exact match)
        Trigger - Add to UGHPS_Camera_x <gen> the event (UGHPS_CameraTimer[(Integer A)] expires)
    -------- Let's make clickable units transparent (unvisible) --------
    Custom script: set bj_wantDestroyGroup = true
    Unit Group - Pick every unit in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Click) or ((Unit-type of (Matching unit)) Equal to Settings))) and do (Change (Picked unit)'s vertex coloring to (100%, 100%, 100%) with 100.00% transparency)
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- HEROES --------
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- Hero destructible model --------
    -------- RED --------
    Set VariableSet UGHPS_HeroModel[((Integer_i x 1) + 20)] = 0124 <gen>
    Set VariableSet UGHPS_HeroModel[((Integer_i x 1) + 40)] = 0247 <gen>
    Set VariableSet UGHPS_HeroModel[((Integer_i x 1) + 60)] = 0154 <gen>
    -------- BLUE --------
    Set VariableSet UGHPS_HeroModel[((Integer_i x 2) + 20)] = 0141 <gen>
    Set VariableSet UGHPS_HeroModel[((Integer_i x 2) + 40)] = 0157 <gen>
    Set VariableSet UGHPS_HeroModel[((Integer_i x 2) + 60)] = 0178 <gen>
    Set VariableSet Integer_i = 100
    For each (Integer A) from 1 to 2, do (Actions)
      Loop - Actions
        -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
        -------- Paladin --------
        -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
        Set VariableSet Integer_k = 20
        -------- Hero unit type --------
        Set VariableSet UGHPS_HERO_H[((Integer_i x (Integer A)) + Integer_k)] = Paladin
        -------- Hero destructible model --------
        Destructible - Hide UGHPS_HeroModel[((Integer_i x (Integer A)) + Integer_k)]
        -------- Damage --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 1))] = |cFF00FF00IIIIIII|r|cFFFF0000III|r
        -------- Range --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 2))] = |cFF00FF00II|r|cFFFF0000IIIIIIII|r
        -------- Armor --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 3))] = |cFF00FF00IIII|r|cFFFF0000IIIIII|r
        -------- AoE --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 4))] = |cFF00FF00I|r|cFFFF0000IIIIIIIII|r
        -------- Support --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 5))] = |cFF00FF00IIIII|r|cFFFF0000IIIII|r
        -------- Regeneration --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 6))] = |cFFFF0000IIIIIIIIII|r
        -------- Hero Name --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 7))] = Aurrius the Pure
        -------- Hero Class --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 8))] = |cffffcc00Palladin
        -------- Hero Introduction --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 9))] = Warrior Hero, exceptional at defense and augmenting nearby friendly troops. Can learn Holy Light, Divine Shield, Devotion Aura and Resurrection. |n|n|cffffcc00Attacks land units.|r
        -------- Stats - Attributes --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 10))] = (|cffffcc0022 + 2.7|r) (17 + 1.8) (13 + 1.5)
        -------- Sound - Hero Selected --------
        Set VariableSet UGHPS_Sound[((Integer_i x (Integer A)) + Integer_k)] = HeroSelectedPaladin <gen>
        -------- Sound - Hero Picked --------
        Set VariableSet UGHPS_Sound[((Integer_i x (Integer A)) + (Integer_k + 1))] = HeroPickedPaladin <gen>
        -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
        -------- Blood Mage --------
        -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
        Set VariableSet Integer_k = 40
        -------- Hero unit type --------
        Set VariableSet UGHPS_HERO_H[((Integer_i x (Integer A)) + Integer_k)] = Blood Mage
        -------- Hero destructible model --------
        Destructible - Hide UGHPS_HeroModel[((Integer_i x (Integer A)) + Integer_k)]
        -------- Damage --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 1))] = |cFF00FF00IIIIIII|r|cFFFF0000III|r
        -------- Range --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 2))] = |cFF00FF00IIIII|r|cFFFF0000IIIII|r
        -------- Armor --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 3))] = |cFF00FF00IIIIIIII|r|cFFFF0000II|r
        -------- AoE --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 4))] = |cFFFF0000IIIIIIIIII|r
        -------- Support --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 5))] = |cFFFF0000IIIIIIIIII|r
        -------- Regeneration --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 6))] = |cFF00FF00II|r|cFFFF0000IIIIIIII|r
        -------- Hero Name --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 7))] = Kelen the Destroyer
        -------- Hero Class --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 8))] = |cffffcc00Blood Mage
        -------- Hero Introduction --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 9))] = Mystical Hero, adept at controlling magic and ranged assaults. Can learn Flame Strike, Banish, Siphon Mana and Phoenix. |n|n|cffffcc00Attacks land and air units.|r
        -------- Stats - Attributes --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 10))] = (18 + 2.0) (14 + 1.0) (|cffffcc0019 + 3.0|r)
        -------- Sound - Hero Selected --------
        Set VariableSet UGHPS_Sound[((Integer_i x (Integer A)) + Integer_k)] = HeroSelectedBloodElf <gen>
        -------- Sound - Hero Picked --------
        Set VariableSet UGHPS_Sound[((Integer_i x (Integer A)) + (Integer_k + 1))] = HeroPickedBloodElf <gen>
        -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
        -------- Ranger --------
        -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
        Set VariableSet Integer_k = 60
        -------- Hero unit type --------
        Set VariableSet UGHPS_HERO_H[((Integer_i x (Integer A)) + Integer_k)] = Ranger
        -------- Hero destructible model --------
        Destructible - Hide UGHPS_HeroModel[((Integer_i x (Integer A)) + Integer_k)]
        -------- Damage --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 1))] = |cFF00FF00IIII|r|cFFFF0000IIIIII|r
        -------- Range --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 2))] = |cFF00FF00IIIII|r|cFFFF0000IIIII|r
        -------- Armor --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 3))] = |cFF00FF00IIIIIIII|r|cFFFF0000II|r
        -------- AoE --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 4))] = |cFF00FF00IIIII|r|cFFFF0000IIIII|r
        -------- Support --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 5))] = |cFFFF0000IIIIIIIIII|r
        -------- Regeneration --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 6))] = |cFF00FF00II|r|cFFFF0000IIIIIIII|r
        -------- Hero Name --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 7))] = Sylvanas Windrunner
        -------- Hero Class --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 8))] = |cffffcc00Ranger
        -------- Hero Introduction --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 9))] = Warrior Hero, adept at enhancing ranged attacks and slaying enemies from afar. Can learn Scout, Cold Arrows, Trueshot Aura, and Starfall. |n|n|cffffcc00Attacks land and air units.|r
        -------- Stats - Attributes --------
        Set VariableSet UGHPS_StringAttributes[((Integer_i x (Integer A)) + (Integer_k + 10))] = (18 + 1.9 ) (|cffffcc0019 + 1.5|r) (15 + 2.6)
        -------- Sound - Hero Selected --------
        Set VariableSet UGHPS_Sound[((Integer_i x (Integer A)) + Integer_k)] = HeroSelectedRanger <gen>
        -------- Sound - Hero Picked --------
        Set VariableSet UGHPS_Sound[((Integer_i x (Integer A)) + (Integer_k + 1))] = HeroPickedRanger <gen>
For go from 1 to 2 because there are 2 players, for more just increase max range (2).
UGHPS Camera
  Events
    Time - Every 0.10 seconds of game time
  Conditions
  Actions
    -------- Each 0.1 sec we create timer that will set camera above system for right player if he use system. --------
    For each (Integer Integer_c) from 1 to 2, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            UGHPS_CameraCheck[Integer_c] Equal to True
          Then - Actions
            Countdown Timer - Start UGHPS_CameraTimer[Integer_c] as a One-shot timer that will expire in 0.00 seconds
          Else - Actions
For go from 1 to 2 because there are 2 players, for more just increase max range (2).
UGHPS Camera x
  Events
  Conditions
  Actions
    -------- It's camera system, just copy it, nothing important really --------
    For each (Integer Integer_c) from 1 to 2, do (Actions)
      Loop - Actions
        Custom script: if GetExpiredTimer() == udg_UGHPS_CameraTimer[udg_Integer_c] then
        Camera - .Apply. UGHPS_Camera[(Player number of (Player(Integer_c)))] for (Player(Integer_c)) over 0.10 seconds
        Skip remaining actions
        Custom script: endif
Interface Human
  Events
    Unit - A unit Sells a unit
  Conditions
    (Unit-type of (Sold unit)) Equal to Human Interface
  Actions
    Destructible - Pick every destructible in UGHPS_InterfaceRegion[(Player number of (Owner of (Sold unit)))] and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Or - Any (Conditions) are true
              Conditions
                (Destructible-type of (Picked destructible)) Equal to B01Q (destructablecode)
                (Destructible-type of (Picked destructible)) Equal to B014 (destructablecode)
                (Destructible-type of (Picked destructible)) Equal to B019 (destructablecode)
          Then - Actions
            Set VariableSet point_p = (Position of (Picked destructible))
            Destructible - Create a B01I (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
            Custom script: call RemoveLocation ( udg_point_p)
            Destructible - Remove (Picked destructible)
          Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                Or - Any (Conditions) are true
                  Conditions
                    (Destructible-type of (Picked destructible)) Equal to B01R (destructablecode)
                    (Destructible-type of (Picked destructible)) Equal to B015 (destructablecode)
                    (Destructible-type of (Picked destructible)) Equal to B01A (destructablecode)
              Then - Actions
                Set VariableSet point_p = (Position of (Picked destructible))
                Destructible - Create a B01J (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                Custom script: call RemoveLocation ( udg_point_p)
                Destructible - Remove (Picked destructible)
              Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    Or - Any (Conditions) are true
                      Conditions
                        (Destructible-type of (Picked destructible)) Equal to B01S (destructablecode)
                        (Destructible-type of (Picked destructible)) Equal to B016 (destructablecode)
                        (Destructible-type of (Picked destructible)) Equal to B01B (destructablecode)
                  Then - Actions
                    Set VariableSet point_p = (Position of (Picked destructible))
                    Destructible - Create a B01K (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                    Custom script: call RemoveLocation ( udg_point_p)
                    Destructible - Remove (Picked destructible)
                  Else - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        Or - Any (Conditions) are true
                          Conditions
                            (Destructible-type of (Picked destructible)) Equal to B01T (destructablecode)
                            (Destructible-type of (Picked destructible)) Equal to B017 (destructablecode)
                            (Destructible-type of (Picked destructible)) Equal to B01C (destructablecode)
                      Then - Actions
                        Set VariableSet point_p = (Position of (Picked destructible))
                        Destructible - Create a B01L (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                        Custom script: call RemoveLocation ( udg_point_p)
                        Destructible - Remove (Picked destructible)
                      Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          If - Conditions
                            Or - Any (Conditions) are true
                              Conditions
                                (Destructible-type of (Picked destructible)) Equal to B01U (destructablecode)
                                (Destructible-type of (Picked destructible)) Equal to B018 (destructablecode)
                                (Destructible-type of (Picked destructible)) Equal to B01D (destructablecode)
                          Then - Actions
                            Set VariableSet point_p = (Position of (Picked destructible))
                            Destructible - Create a B01M (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                            Custom script: call RemoveLocation ( udg_point_p)
                            Destructible - Remove (Picked destructible)
                          Else - Actions
                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              If - Conditions
                                Or - Any (Conditions) are true
                                  Conditions
                                    (Destructible-type of (Picked destructible)) Equal to B01V (destructablecode)
                                    (Destructible-type of (Picked destructible)) Equal to B013 (destructablecode)
                                    (Destructible-type of (Picked destructible)) Equal to B01E (destructablecode)
                              Then - Actions
                                Set VariableSet point_p = (Position of (Picked destructible))
                                Destructible - Create a B01N (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                                Custom script: call RemoveLocation ( udg_point_p)
                                Destructible - Remove (Picked destructible)
                              Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  If - Conditions
                                    Or - Any (Conditions) are true
                                      Conditions
                                        (Destructible-type of (Picked destructible)) Equal to B01W (destructablecode)
                                        (Destructible-type of (Picked destructible)) Equal to B012 (destructablecode)
                                        (Destructible-type of (Picked destructible)) Equal to B01F (destructablecode)
                                  Then - Actions
                                    Set VariableSet point_p = (Position of (Picked destructible))
                                    Destructible - Create a B01O (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                                    Custom script: call RemoveLocation ( udg_point_p)
                                    Destructible - Remove (Picked destructible)
                                  Else - Actions
                                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                      If - Conditions
                                        Or - Any (Conditions) are true
                                          Conditions
                                            (Destructible-type of (Picked destructible)) Equal to B01X (destructablecode)
                                            (Destructible-type of (Picked destructible)) Equal to B011 (destructablecode)
                                            (Destructible-type of (Picked destructible)) Equal to B01G (destructablecode)
                                      Then - Actions
                                        Set VariableSet point_p = (Position of (Picked destructible))
                                        Destructible - Create a B01P (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                                        Custom script: call RemoveLocation ( udg_point_p)
                                        Destructible - Remove (Picked destructible)
                                      Else - Actions
Interface Orc
  Events
    Unit - A unit Sells a unit
  Conditions
    (Unit-type of (Sold unit)) Equal to Orc Interface
  Actions
    Destructible - Pick every destructible in UGHPS_InterfaceRegion[(Player number of (Owner of (Sold unit)))] and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Or - Any (Conditions) are true
              Conditions
                (Destructible-type of (Picked destructible)) Equal to B01I (destructablecode)
                (Destructible-type of (Picked destructible)) Equal to B01Q (destructablecode)
                (Destructible-type of (Picked destructible)) Equal to B019 (destructablecode)
          Then - Actions
            Set VariableSet point_p = (Position of (Picked destructible))
            Destructible - Create a B014 (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
            Custom script: call RemoveLocation ( udg_point_p)
            Destructible - Remove (Picked destructible)
          Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                Or - Any (Conditions) are true
                  Conditions
                    (Destructible-type of (Picked destructible)) Equal to B01J (destructablecode)
                    (Destructible-type of (Picked destructible)) Equal to B01R (destructablecode)
                    (Destructible-type of (Picked destructible)) Equal to B01A (destructablecode)
              Then - Actions
                Set VariableSet point_p = (Position of (Picked destructible))
                Destructible - Create a B015 (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                Custom script: call RemoveLocation ( udg_point_p)
                Destructible - Remove (Picked destructible)
              Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    Or - Any (Conditions) are true
                      Conditions
                        (Destructible-type of (Picked destructible)) Equal to B01K (destructablecode)
                        (Destructible-type of (Picked destructible)) Equal to B01S (destructablecode)
                        (Destructible-type of (Picked destructible)) Equal to B01B (destructablecode)
                  Then - Actions
                    Set VariableSet point_p = (Position of (Picked destructible))
                    Destructible - Create a B016 (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                    Custom script: call RemoveLocation ( udg_point_p)
                    Destructible - Remove (Picked destructible)
                  Else - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        Or - Any (Conditions) are true
                          Conditions
                            (Destructible-type of (Picked destructible)) Equal to B01L (destructablecode)
                            (Destructible-type of (Picked destructible)) Equal to B01T (destructablecode)
                            (Destructible-type of (Picked destructible)) Equal to B01C (destructablecode)
                      Then - Actions
                        Set VariableSet point_p = (Position of (Picked destructible))
                        Destructible - Create a B017 (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                        Custom script: call RemoveLocation ( udg_point_p)
                        Destructible - Remove (Picked destructible)
                      Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          If - Conditions
                            Or - Any (Conditions) are true
                              Conditions
                                (Destructible-type of (Picked destructible)) Equal to B01M (destructablecode)
                                (Destructible-type of (Picked destructible)) Equal to B01U (destructablecode)
                                (Destructible-type of (Picked destructible)) Equal to B01D (destructablecode)
                          Then - Actions
                            Set VariableSet point_p = (Position of (Picked destructible))
                            Destructible - Create a B018 (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                            Custom script: call RemoveLocation ( udg_point_p)
                            Destructible - Remove (Picked destructible)
                          Else - Actions
                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              If - Conditions
                                Or - Any (Conditions) are true
                                  Conditions
                                    (Destructible-type of (Picked destructible)) Equal to B01N (destructablecode)
                                    (Destructible-type of (Picked destructible)) Equal to B01V (destructablecode)
                                    (Destructible-type of (Picked destructible)) Equal to B01E (destructablecode)
                              Then - Actions
                                Set VariableSet point_p = (Position of (Picked destructible))
                                Destructible - Create a B013 (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                                Custom script: call RemoveLocation ( udg_point_p)
                                Destructible - Remove (Picked destructible)
                              Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  If - Conditions
                                    Or - Any (Conditions) are true
                                      Conditions
                                        (Destructible-type of (Picked destructible)) Equal to B01O (destructablecode)
                                        (Destructible-type of (Picked destructible)) Equal to B01W (destructablecode)
                                        (Destructible-type of (Picked destructible)) Equal to B01F (destructablecode)
                                  Then - Actions
                                    Set VariableSet point_p = (Position of (Picked destructible))
                                    Destructible - Create a B012 (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                                    Custom script: call RemoveLocation ( udg_point_p)
                                    Destructible - Remove (Picked destructible)
                                  Else - Actions
                                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                      If - Conditions
                                        Or - Any (Conditions) are true
                                          Conditions
                                            (Destructible-type of (Picked destructible)) Equal to B01P (destructablecode)
                                            (Destructible-type of (Picked destructible)) Equal to B01X (destructablecode)
                                            (Destructible-type of (Picked destructible)) Equal to B01G (destructablecode)
                                      Then - Actions
                                        Set VariableSet point_p = (Position of (Picked destructible))
                                        Destructible - Create a B011 (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                                        Custom script: call RemoveLocation ( udg_point_p)
                                        Destructible - Remove (Picked destructible)
                                      Else - Actions
Interface Night Elf
  Events
    Unit - A unit Sells a unit
  Conditions
    (Unit-type of (Sold unit)) Equal to Night Elf Interface
  Actions
    Destructible - Pick every destructible in UGHPS_InterfaceRegion[(Player number of (Owner of (Sold unit)))] and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Or - Any (Conditions) are true
              Conditions
                (Destructible-type of (Picked destructible)) Equal to B01I (destructablecode)
                (Destructible-type of (Picked destructible)) Equal to B014 (destructablecode)
                (Destructible-type of (Picked destructible)) Equal to B019 (destructablecode)
          Then - Actions
            Set VariableSet point_p = (Position of (Picked destructible))
            Destructible - Create a B01Q (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
            Custom script: call RemoveLocation ( udg_point_p)
            Destructible - Remove (Picked destructible)
          Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                Or - Any (Conditions) are true
                  Conditions
                    (Destructible-type of (Picked destructible)) Equal to B01J (destructablecode)
                    (Destructible-type of (Picked destructible)) Equal to B015 (destructablecode)
                    (Destructible-type of (Picked destructible)) Equal to B01A (destructablecode)
              Then - Actions
                Set VariableSet point_p = (Position of (Picked destructible))
                Destructible - Create a B01R (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                Custom script: call RemoveLocation ( udg_point_p)
                Destructible - Remove (Picked destructible)
              Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    Or - Any (Conditions) are true
                      Conditions
                        (Destructible-type of (Picked destructible)) Equal to B01K (destructablecode)
                        (Destructible-type of (Picked destructible)) Equal to B016 (destructablecode)
                        (Destructible-type of (Picked destructible)) Equal to B01B (destructablecode)
                  Then - Actions
                    Set VariableSet point_p = (Position of (Picked destructible))
                    Destructible - Create a B01S (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                    Custom script: call RemoveLocation ( udg_point_p)
                    Destructible - Remove (Picked destructible)
                  Else - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        Or - Any (Conditions) are true
                          Conditions
                            (Destructible-type of (Picked destructible)) Equal to B01L (destructablecode)
                            (Destructible-type of (Picked destructible)) Equal to B017 (destructablecode)
                            (Destructible-type of (Picked destructible)) Equal to B01C (destructablecode)
                      Then - Actions
                        Set VariableSet point_p = (Position of (Picked destructible))
                        Destructible - Create a B01T (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                        Custom script: call RemoveLocation ( udg_point_p)
                        Destructible - Remove (Picked destructible)
                      Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          If - Conditions
                            Or - Any (Conditions) are true
                              Conditions
                                (Destructible-type of (Picked destructible)) Equal to B01M (destructablecode)
                                (Destructible-type of (Picked destructible)) Equal to B018 (destructablecode)
                                (Destructible-type of (Picked destructible)) Equal to B01D (destructablecode)
                          Then - Actions
                            Set VariableSet point_p = (Position of (Picked destructible))
                            Destructible - Create a B01U (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                            Custom script: call RemoveLocation ( udg_point_p)
                            Destructible - Remove (Picked destructible)
                          Else - Actions
                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              If - Conditions
                                Or - Any (Conditions) are true
                                  Conditions
                                    (Destructible-type of (Picked destructible)) Equal to B01N (destructablecode)
                                    (Destructible-type of (Picked destructible)) Equal to B013 (destructablecode)
                                    (Destructible-type of (Picked destructible)) Equal to B01E (destructablecode)
                              Then - Actions
                                Set VariableSet point_p = (Position of (Picked destructible))
                                Destructible - Create a B01V (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                                Custom script: call RemoveLocation ( udg_point_p)
                                Destructible - Remove (Picked destructible)
                              Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  If - Conditions
                                    Or - Any (Conditions) are true
                                      Conditions
                                        (Destructible-type of (Picked destructible)) Equal to B01O (destructablecode)
                                        (Destructible-type of (Picked destructible)) Equal to B012 (destructablecode)
                                        (Destructible-type of (Picked destructible)) Equal to B01F (destructablecode)
                                  Then - Actions
                                    Set VariableSet point_p = (Position of (Picked destructible))
                                    Destructible - Create a B01W (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                                    Custom script: call RemoveLocation ( udg_point_p)
                                    Destructible - Remove (Picked destructible)
                                  Else - Actions
                                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                      If - Conditions
                                        Or - Any (Conditions) are true
                                          Conditions
                                            (Destructible-type of (Picked destructible)) Equal to B01P (destructablecode)
                                            (Destructible-type of (Picked destructible)) Equal to B011 (destructablecode)
                                            (Destructible-type of (Picked destructible)) Equal to B01G (destructablecode)
                                      Then - Actions
                                        Set VariableSet point_p = (Position of (Picked destructible))
                                        Destructible - Create a B01X (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                                        Custom script: call RemoveLocation ( udg_point_p)
                                        Destructible - Remove (Picked destructible)
                                      Else - Actions
Interface Undead
  Events
    Unit - A unit Sells a unit
  Conditions
    (Unit-type of (Sold unit)) Equal to Undead Interface
  Actions
    Destructible - Pick every destructible in UGHPS_InterfaceRegion[(Player number of (Owner of (Sold unit)))] and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            Or - Any (Conditions) are true
              Conditions
                (Destructible-type of (Picked destructible)) Equal to B01I (destructablecode)
                (Destructible-type of (Picked destructible)) Equal to B014 (destructablecode)
                (Destructible-type of (Picked destructible)) Equal to B01Q (destructablecode)
          Then - Actions
            Set VariableSet point_p = (Position of (Picked destructible))
            Destructible - Create a B019 (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
            Custom script: call RemoveLocation ( udg_point_p)
            Destructible - Remove (Picked destructible)
          Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                Or - Any (Conditions) are true
                  Conditions
                    (Destructible-type of (Picked destructible)) Equal to B01J (destructablecode)
                    (Destructible-type of (Picked destructible)) Equal to B015 (destructablecode)
                    (Destructible-type of (Picked destructible)) Equal to B01R (destructablecode)
              Then - Actions
                Set VariableSet point_p = (Position of (Picked destructible))
                Destructible - Create a B01A (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                Custom script: call RemoveLocation ( udg_point_p)
                Destructible - Remove (Picked destructible)
              Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    Or - Any (Conditions) are true
                      Conditions
                        (Destructible-type of (Picked destructible)) Equal to B01K (destructablecode)
                        (Destructible-type of (Picked destructible)) Equal to B016 (destructablecode)
                        (Destructible-type of (Picked destructible)) Equal to B01S (destructablecode)
                  Then - Actions
                    Set VariableSet point_p = (Position of (Picked destructible))
                    Destructible - Create a B01B (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                    Custom script: call RemoveLocation ( udg_point_p)
                    Destructible - Remove (Picked destructible)
                  Else - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        Or - Any (Conditions) are true
                          Conditions
                            (Destructible-type of (Picked destructible)) Equal to B01L (destructablecode)
                            (Destructible-type of (Picked destructible)) Equal to B017 (destructablecode)
                            (Destructible-type of (Picked destructible)) Equal to B01T (destructablecode)
                      Then - Actions
                        Set VariableSet point_p = (Position of (Picked destructible))
                        Destructible - Create a B01C (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                        Custom script: call RemoveLocation ( udg_point_p)
                        Destructible - Remove (Picked destructible)
                      Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          If - Conditions
                            Or - Any (Conditions) are true
                              Conditions
                                (Destructible-type of (Picked destructible)) Equal to B01M (destructablecode)
                                (Destructible-type of (Picked destructible)) Equal to B018 (destructablecode)
                                (Destructible-type of (Picked destructible)) Equal to B01U (destructablecode)
                          Then - Actions
                            Set VariableSet point_p = (Position of (Picked destructible))
                            Destructible - Create a B01D (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                            Custom script: call RemoveLocation ( udg_point_p)
                            Destructible - Remove (Picked destructible)
                          Else - Actions
                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              If - Conditions
                                Or - Any (Conditions) are true
                                  Conditions
                                    (Destructible-type of (Picked destructible)) Equal to B01N (destructablecode)
                                    (Destructible-type of (Picked destructible)) Equal to B013 (destructablecode)
                                    (Destructible-type of (Picked destructible)) Equal to B01V (destructablecode)
                              Then - Actions
                                Set VariableSet point_p = (Position of (Picked destructible))
                                Destructible - Create a B01E (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                                Custom script: call RemoveLocation ( udg_point_p)
                                Destructible - Remove (Picked destructible)
                              Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                  If - Conditions
                                    Or - Any (Conditions) are true
                                      Conditions
                                        (Destructible-type of (Picked destructible)) Equal to B01O (destructablecode)
                                        (Destructible-type of (Picked destructible)) Equal to B012 (destructablecode)
                                        (Destructible-type of (Picked destructible)) Equal to B01W (destructablecode)
                                  Then - Actions
                                    Set VariableSet point_p = (Position of (Picked destructible))
                                    Destructible - Create a B01F (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                                    Custom script: call RemoveLocation ( udg_point_p)
                                    Destructible - Remove (Picked destructible)
                                  Else - Actions
                                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                      If - Conditions
                                        Or - Any (Conditions) are true
                                          Conditions
                                            (Destructible-type of (Picked destructible)) Equal to B01P (destructablecode)
                                            (Destructible-type of (Picked destructible)) Equal to B011 (destructablecode)
                                            (Destructible-type of (Picked destructible)) Equal to B01X (destructablecode)
                                      Then - Actions
                                        Set VariableSet point_p = (Position of (Picked destructible))
                                        Destructible - Create a B01G (destructablecode) at point_p facing 0.00 with scale 1 and variation 0
                                        Custom script: call RemoveLocation ( udg_point_p)
                                        Destructible - Remove (Picked destructible)
                                      Else - Actions
Events are added trought triggers in UGHPS Setup trigger.
UGHPS Progress
  Events
  Conditions
  Actions
    Set VariableSet UGHPS_CameraCheck[(Player number of (Triggering player))] = True
    Camera - .Apply. UGHPS_Camera[(Player number of (Triggering player))] for (Triggering player) over 0.00 seconds
    Trigger - Turn on UGHPS_Camera <gen>
Events are added trought triggers in UGHPS Setup trigger.
UGHPS Buttons
  Events
  Conditions
    (Unit-type of (Triggering unit)) Equal to Click
  Actions
    -------- Turn off trigger to fix small bug when player click fast on icon and create few heroes at same time. --------
    Trigger - Turn off (This trigger)
    -------- Remove selected unit from player selection. --------
    Selection - Clear selection for (Triggering player).
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- Button Selection --------
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- Paladin --------
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Or - Any (Conditions) are true
          Conditions
            (Triggering unit) Equal to 0001 <gen>
            (Triggering unit) Equal to 0008 <gen>
      Then - Actions
        -------- Hero number --------
        -------- WARRNING: 20 is integer_k value from setup trigger, we used 20 as multiple there (20 for 1st hero, 40 for 2nd 60 for 3rd) --------
        Set VariableSet Integer_k = 20
        -------- integer_h is variable that define hero, unneeded really but it makes trigger action below more eye kindly. --------
        Set VariableSet Integer_h = ((Integer_i x (Player number of (Triggering player))) + Integer_k)
        -------- Location variable that use position of created unit, used for cleaning leaks :) --------
        Set VariableSet point_p = (Position of (Triggering unit))
        -------- We create effect on hero icon (variable point_p) --------
        Special Effect - Create a special effect at point_p using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
        -------- We destroy same effect to clean leak. --------
        Special Effect - Destroy (Last created special effect)
        -------- We destroy point_p to clean leaks. --------
        Custom script: call RemoveLocation ( udg_point_p)
        For each (Integer A) from 1 to 3, do (Actions)
          Loop - Actions
            -------- WARRNING: 20 is integer_k value from setup trigger, we used 20 as multiple there (20 for 1st hero, 40 for 2nd 60 for 3rd) --------
            -------- We hide all hero destructibles shown to player --------
            Destructible - Hide UGHPS_HeroModel[(((Player number of (Triggering player)) x Integer_i) + (20 x (Integer A)))]
        -------- Now only show right one :) --------
        Destructible - Show UGHPS_HeroModel[(((Player number of (Triggering player)) x Integer_i) + Integer_k)]
        -------- Play sound when player click on hero icon --------
        Sound - Play UGHPS_Sound[((Integer_i x (Player number of (Triggering player))) + Integer_k)] at 100.00% volume, attached to (Triggering unit)
        -------- Let's remove all text, create new one and store it to variables once again. --------
        For each (Integer A) from 1 to 11, do (Actions)
          Loop - Actions
            Floating Text - Destroy UGHPS_FT[(Integer A)]
            Floating Text - Create floating text that reads UGHPS_StringAttributes[(((Player number of (Triggering player)) x Integer_i) + (Integer_k + (Integer A)))] at UGHPS_HeroStats[(((Player number of (Triggering player)) x Integer_i) + ((Integer A) + 1))] with Z offset 0, using font size 8.00, color (100%, 100%, 100%), and 0% transparency
            Set VariableSet UGHPS_FT[(Integer A)] = (Last created floating text)
        Wait 0.00 seconds
        Trigger - Turn on (This trigger)
        Skip remaining actions
      Else - Actions
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- Blood Mage --------
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Or - Any (Conditions) are true
          Conditions
            (Triggering unit) Equal to 0005 <gen>
            (Triggering unit) Equal to 0009 <gen>
      Then - Actions
        -------- Hero number --------
        -------- WARRNING: 40 is integer_k value from setup trigger, we used 20 as multiple there (20 for 1st hero, 40 for 2nd 60 for 3rd) --------
        Set VariableSet Integer_k = 40
        -------- integer_h is variable that define hero, unneeded really but it makes trigger action below more eye kindly. --------
        Set VariableSet Integer_h = ((Integer_i x (Player number of (Triggering player))) + Integer_k)
        -------- Location variable that use position of created unit, used for cleaning leaks :) --------
        Set VariableSet point_p = (Position of (Triggering unit))
        -------- We create effect on hero icon (variable point_p) --------
        Special Effect - Create a special effect at point_p using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
        -------- We destroy same effect to clean leak. --------
        Special Effect - Destroy (Last created special effect)
        -------- We destroy point_p to clean leaks. --------
        Custom script: call RemoveLocation ( udg_point_p)
        For each (Integer A) from 1 to 3, do (Actions)
          Loop - Actions
            -------- WARRNING: 20 is integer_k value from setup trigger, we used 20 as multiple there (20 for 1st hero, 40 for 2nd 60 for 3rd) --------
            -------- We hide all hero destructibles shown to player --------
            Destructible - Hide UGHPS_HeroModel[(((Player number of (Triggering player)) x Integer_i) + (20 x (Integer A)))]
        -------- Now only show right one :) --------
        Destructible - Show UGHPS_HeroModel[(((Player number of (Triggering player)) x Integer_i) + Integer_k)]
        -------- Play sound when player click on hero icon --------
        Sound - Play UGHPS_Sound[((Integer_i x (Player number of (Triggering player))) + Integer_k)] at 100.00% volume, attached to (Triggering unit)
        -------- Let's remove all text, create new one and store it to variables once again. --------
        For each (Integer A) from 1 to 11, do (Actions)
          Loop - Actions
            Floating Text - Destroy UGHPS_FT[(Integer A)]
            Floating Text - Create floating text that reads UGHPS_StringAttributes[(((Player number of (Triggering player)) x Integer_i) + (Integer_k + (Integer A)))] at UGHPS_HeroStats[(((Player number of (Triggering player)) x Integer_i) + ((Integer A) + 1))] with Z offset 0, using font size 8.00, color (100%, 100%, 100%), and 0% transparency
            Set VariableSet UGHPS_FT[(Integer A)] = (Last created floating text)
        Wait 0.00 seconds
        Trigger - Turn on (This trigger)
        Skip remaining actions
      Else - Actions
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- Ranger --------
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Or - Any (Conditions) are true
          Conditions
            (Triggering unit) Equal to 0003 <gen>
            (Triggering unit) Equal to 0010 <gen>
      Then - Actions
        -------- Hero number --------
        -------- WARRNING: 60 is integer_k value from setup trigger, we used 20 as multiple there (20 for 1st hero, 40 for 2nd 60 for 3rd) --------
        Set VariableSet Integer_k = 60
        -------- integer_h is variable that define hero, unneeded really but it makes trigger action below more eye kindly. --------
        Set VariableSet Integer_h = ((Integer_i x (Player number of (Triggering player))) + Integer_k)
        -------- Location variable that use position of created unit, used for cleaning leaks :) --------
        Set VariableSet point_p = (Position of (Triggering unit))
        -------- We create effect on hero icon (variable point_p) --------
        Special Effect - Create a special effect at point_p using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
        -------- We destroy same effect to clean leak. --------
        Special Effect - Destroy (Last created special effect)
        -------- We destroy point_p to clean leaks. --------
        Custom script: call RemoveLocation ( udg_point_p)
        For each (Integer A) from 1 to 3, do (Actions)
          Loop - Actions
            -------- WARRNING: 20 is integer_k value from setup trigger, we used 20 as multiple there (20 for 1st hero, 40 for 2nd 60 for 3rd) --------
            -------- We hide all hero destructibles shown to player --------
            Destructible - Hide UGHPS_HeroModel[(((Player number of (Triggering player)) x Integer_i) + (20 x (Integer A)))]
        -------- Now only show right one :) --------
        Destructible - Show UGHPS_HeroModel[(((Player number of (Triggering player)) x Integer_i) + Integer_k)]
        -------- Play sound when player click on hero icon --------
        Sound - Play UGHPS_Sound[((Integer_i x (Player number of (Triggering player))) + Integer_k)] at 100.00% volume, attached to (Triggering unit)
        -------- Let's remove all text, create new one and store it to variables once again. --------
        For each (Integer A) from 1 to 11, do (Actions)
          Loop - Actions
            Floating Text - Destroy UGHPS_FT[(Integer A)]
            Floating Text - Create floating text that reads UGHPS_StringAttributes[(((Player number of (Triggering player)) x Integer_i) + (Integer_k + (Integer A)))] at UGHPS_HeroStats[(((Player number of (Triggering player)) x Integer_i) + ((Integer A) + 1))] with Z offset 0, using font size 8.00, color (100%, 100%, 100%), and 0% transparency
            Set VariableSet UGHPS_FT[(Integer A)] = (Last created floating text)
        Wait 0.00 seconds
        Trigger - Turn on (This trigger)
        Skip remaining actions
      Else - Actions
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- OK Button --------
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        And - All (Conditions) are true
          Conditions
            Or - Any (Conditions) are true
              Conditions
                (Triggering unit) Equal to 0022 <gen>
                (Triggering unit) Equal to 0007 <gen>
            Integer_h Not equal to 0
      Then - Actions
        Set VariableSet UGHPS_CameraCheck[(Player number of (Triggering player))] = False
        Unit - Create 1.UGHPS_HERO_H[Integer_h] for (Triggering player) at UGHPS_HeroStats[(((Player number of (Triggering player)) x Integer_i) + 12)] facing Default building facing degrees
        -------- Let's display message to enemy players --------
        Set VariableSet UGHPS_TempForce = (All enemies of (Triggering player).)
        Quest - Display to UGHPS_TempForce the Hint message: (TextColor[(Player number of (Triggering player))] + ((Name of (Triggering player)) + (|r has picked + (Name of (Last created unit)))))
        Custom script: call DestroyForce (udg_UGHPS_TempForce)
        -------- Play sound when player select hero --------
        Sound - Play UGHPS_Sound[((Integer_i x (Player number of (Triggering player))) + (Integer_k + 1))] at 100.00% volume, attached to (Last created unit)
        -------- Location variable that use position of created unit, used for cleaning leaks :) --------
        Set VariableSet point_p = (Position of (Last created unit))
        Camera - Pan camera for (Triggering player) to point_p over 0 seconds
        Wait 0.00 seconds
        -------- We create effect on hero spawn location (variable point_p) --------
        Special Effect - Create a special effect at point_p using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
        -------- We destroy same effect to clean leak. --------
        Special Effect - Destroy (Last created special effect)
        Camera - Reset camera for (Triggering player) to standard game-view over 0 seconds
        -------- We destroy point_p to clean leaks. --------
        Custom script: call RemoveLocation ( udg_point_p)
        Wait 0.00 seconds
        Trigger - Turn on (This trigger)
        Skip remaining actions
      Else - Actions
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    -------- Random Button --------
    -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        Or - Any (Conditions) are true
          Conditions
            (Triggering unit) Equal to 0002 <gen>
            (Triggering unit) Equal to 0006 <gen>
      Then - Actions
        Set VariableSet UGHPS_CameraCheck[(Player number of (Triggering player))] = False
        Set VariableSet Integer_h = ((Integer_i x (Player number of (Triggering player))) + (20 x (Random integer number between 1 and 3)))
        Unit - Create 1.UGHPS_HERO_H[Integer_h] for (Triggering player) at UGHPS_HeroStats[(((Player number of (Triggering player)) x Integer_i) + 12)] facing Default building facing degrees
        -------- Let's display message to enemy players --------
        Set VariableSet UGHPS_TempForce = (All enemies of (Triggering player).)
        Quest - Display to UGHPS_TempForce the Hint message: (TextColor[(Player number of (Triggering player))] + ((Name of (Triggering player)) + (|r has randomed + (Name of (Last created unit)))))
        Custom script: call DestroyForce (udg_UGHPS_TempForce)
        -------- Play sound when player select hero --------
        Sound - Play UGHPS_Sound[Integer_h] at 100.00% volume, attached to (Last created unit)
        -------- Location variable that use position of created unit, used for cleaning leaks :) --------
        Set VariableSet point_p = (Position of (Last created unit))
        Camera - Pan camera for (Triggering player) to point_p over 0 seconds
        Wait 0.00 seconds
        -------- We create effect on hero spawn location (variable point_p) --------
        Special Effect - Create a special effect at point_p using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
        -------- We destroy same effect to clean leak. --------
        Special Effect - Destroy (Last created special effect)
        Camera - Reset camera for (Triggering player) to standard game-view over 0 seconds
        -------- We destroy point_p to clean leaks. --------
        Custom script: call RemoveLocation ( udg_point_p)
        Wait 0.00 seconds
        Trigger - Turn on (This trigger)
        Skip remaining actions
      Else - Actions
Temp Trigger
  Events
    Time - Elapsed game time is 0.00 seconds
  Conditions
  Actions
    For each (Integer A) from 1 to 5, do (Actions)
      Loop - Actions
        Visibility - Create an initially Enabled visibility modifier for (Player((Integer A))) emitting Visibility across (Playable map area)
        Visibility - Enable (Last created visibility modifier)
    Multiboard - Create a multiboard with 1 columns and 4 rows, titled Press "ESC" or write "XXX" to use system!.
    Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
    Multiboard - Set the width for (Last created multiboard) item in column 1, row 0 to 25.00% of the total screen width
    Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Created by -Kobas-
    Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to Version 2.3 Ultimate
    Multiboard - Set the text for (Last created multiboard) item in column 1, row 3 to
    Multiboard - Set the text for (Last created multiboard) item in column 1, row 4 to www.hiveworkshop.com
    Multiboard - Show (Last created multiboard)
    Multiboard - Maximize (Last created multiboard)
    Custom script: call DestroyTrigger (GetTriggeringTrigger())