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

Marine Hero Survival 2.3.w3x
Variables
Variables
Triggers
init
initSupplies
initTriggers
initVision
initArrays
createPlayers
createSupplies
spawn
attack
stackItem
deathZerg
deathBoss
victory
leave
enemyAttack
bossAttack
difficulty
createDifficultyDialog
difficultyButtonClicked
setDifficulty
tips
collectAmmoTip
itemShopTip
supplyTip
level1
start
stop
level2
start2
stop2
level3
start3
stop3
level4
start4
stop4
abilities
addRockets
addHide
addHeal
addRest
addEnrage
addEnergyShield
addTeleport
upgradePassives
accuracy
endurance
stamina
items
captainsFlagGain
captainsFlagRemove
sniperGain
sniperRemove
sniperRifleScopeGain
sniperRifleScopeRemove
pistolGain
pistolRemove
dualPistolGain
dualPistolRemove
shotgunGain
shotgunRemove
recipes
alienBoots
sniperScope
marineSet
doublePistols
doubleUzi
nuclearBomb
IncreaseLevel
addSkillPoint
enduranceUp
accuracyUp
staminaUp
headshotUp
movementSpeedUp
upgrades
improvedBarricades
weaponUpgrades
nanobotRegeneration
armorUpgrade
sniperTraining
exosuitUpgrade
shop
shops
marineUpgrades
buildingUpgrades
weapons
armor
marineAbilities
main
addEnergy
addIncome
addSupplies
purchaseSupplyItems
purchaseStimpack
upgradeSupplyGenerator
upgradePowerGenerator
upgradeIncome
upgradeTech
multiboard
create
updateMultiboard
revive
marineRevive
marineDeath
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 except Custom Script Item. Custom Script Item will merge into map script after globals variables declaration with the list order in trigger view.

		
Name Type Is Array Initial Value
abilityType abilcode No
activeItem item No
amount integer No
badGroup group No
badPlayers force No
bossGroup group No
chooseUnit dialog No
deadMarines boolean Yes
deaths integer No
deathTimer timer Yes
difficultyButton button Yes
difficultyDialog dialog No
difficultyIndex integer No
difficultyStrings string Yes
difficultyVotes integer Yes
enemyPlayers player Yes
energyIncrease integer No 10
finalWave boolean No
hasDefensive boolean Yes
hasEnergyShield boolean Yes
hasEnrage boolean Yes
hasHeal boolean Yes
hasHide boolean Yes
hasRest boolean Yes
hasRockets boolean Yes
income integer No 100
incomeEnergyCost integer No 100
incomeTimer timer No
itemA itemcode No
itemB itemcode No
itemC itemcode No
itemD itemcode No
level integer No
marineGroup group No
marines unit Yes
maxPlayers integer No 8
multiboard multiboard No
players force No
refundAmount integer No
roundTimer timer No
roundTimerWindow timerdialog No
spawnPoints rect Yes
spawnType unitcode No
supplyEnergyCost integer No 100
supplyGen integer No 5
supplyTimer timer No
techLevel integer No 1
tempGroup group No
tempInt integer No
tempItem item No
tempItemType itemcode No
tempPlayerNumber integer No
tempPlayers force No
tempPoint location No
tempPoint2 location No
tempString string No
tempUnit unit No
timerWindows timerdialog Yes
trainingLevel integer No 1
unitCount integer Yes
upgrades boolean Yes
upgradeType techcode No
visionDisabled boolean No
visionPower fogmodifier Yes
waveOn boolean No
xpValues integer Yes
init
  Events
    Time - Elapsed game time is 0.00 seconds
  Conditions
  Actions
    Countdown Timer - Start supplyTimer as a Repeating timer that will expire in 120.00 seconds
    Game - Set time of day speed to 0.00% of the default speed
    Trigger - Run initArrays <gen> (checking conditions)
    Trigger - Run createSupplies <gen> (checking conditions)
    Trigger - Run initVision <gen> (checking conditions)
    Trigger - Run initTriggers <gen> (checking conditions)
    Trigger - Run initSupplies <gen> (checking conditions)
    Trigger - Run createPlayers <gen> (checking conditions)
    Set VariableSet tempPoint = (Random point in playerSpawn <gen>)
    Item - Create Captains Flag at (Random point in playerSpawn <gen>)
    Custom script: call RemoveLocation(udg_tempPoint)
    Set VariableSet level = 1
initSupplies
  Events
  Conditions
  Actions
    Hero - Create Supplies and give it to Ammo Dump 0024 <gen>
    Item - Set charges remaining in (Item carried by Ammo Dump 0024 <gen> of type Supplies) to 5
initTriggers
  Events
  Conditions
  Actions
    For each (Integer A) from 0 to maxPlayers, do (Actions)
      Loop - Actions
        Trigger - Add to marineRevive <gen> the event (deathTimer[(Integer A)] expires)
initVision
  Events
  Conditions
  Actions
    For each (Integer A) from 1 to maxPlayers, do (Actions)
      Loop - Actions
        Visibility - Create an initially Enabled visibility modifier for (Player((Integer A))) emitting Visibility across playerSpawn <gen>
        Set VariableSet visionPower[((Integer A) - 1)] = (Last created visibility modifier)
        Visibility - Create an initially Enabled visibility modifier for (Player((Integer A))) emitting Black mask across (Entire map)
initArrays
  Events
  Conditions
  Actions
    Set VariableSet spawnPoints[0] = spawn1 <gen>
    Set VariableSet spawnPoints[1] = spawn2 <gen>
    Set VariableSet spawnPoints[2] = spawn3 <gen>
    Set VariableSet spawnPoints[3] = spawn4 <gen>
    Set VariableSet spawnPoints[4] = spawn5 <gen>
    Set VariableSet spawnPoints[5] = spawn6 <gen>
    Set VariableSet spawnPoints[6] = spawn7 <gen>
    Set VariableSet spawnPoints[7] = spawn8 <gen>
    Set VariableSet enemyPlayers[0] = Player 20 (Lavender)
    Set VariableSet enemyPlayers[1] = Player 21 (Coal)
    Set VariableSet enemyPlayers[2] = Player 22 (Snow)
    Set VariableSet enemyPlayers[3] = Player 23 (Emerald)
createPlayers
  Events
  Conditions
  Actions
    Set VariableSet players = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)).)
    Player Group - Pick every player in players and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Player number of (Picked player)) Less than or equal to maxPlayers
          Then - Actions
            Set VariableSet tempPoint = (Random point in playerSpawn <gen>)
            Unit - Create 1.Marine for (Picked player) at tempPoint facing Default building facing degrees
            Unit - Add Headshot to (Last created unit)
            Unit - Add Evasion to (Last created unit)
            Hero - Create Barricade and give it to (Last created unit)
            Item - Set charges remaining in (Last created item) to 5
            Player - Set (Picked player).Food used to 5
            Hero - Create Ammo and give it to (Last created unit)
            Item - Set charges remaining in (Last created item) to 20
            Unit Group - Add (Last created unit) to marineGroup
            Set VariableSet marines[((Player number of (Picked player)) - 1)] = (Last created unit)
            Selection - Select (Last created unit) for (Owner of (Last created unit))
            Camera - Pan camera for (Owner of (Last created unit)) to tempPoint over 0 seconds
            Trigger - Add to leave <gen> the event ((Player((Player number of (Picked player)))) leaves the game)
            Custom script: call RemoveLocation(udg_tempPoint)
          Else - Actions
    For each (Integer A) from 0 to 3, do (Actions)
      Loop - Actions
        Player - Turn Gives bounty On for enemyPlayers[(Integer A)]
createSupplies
  Events
  Conditions
  Actions
    For each (Integer A) from 1 to (((85 + (Random integer number between 0 and 20)) - (level x 5)) - (difficultyIndex x 5)), do (Actions)
      Loop - Actions
        Set VariableSet tempPoint = (Random point in (Playable map area))
        Item - Create Ammo at tempPoint
        Custom script: call RemoveLocation(udg_tempPoint)
    For each (Integer A) from 1 to (Random integer number between 1 and 5), do (Actions)
      Loop - Actions
        Set VariableSet tempPoint = (Random point in (Playable map area))
        Item - Create Medpack at tempPoint
        Custom script: call RemoveLocation(udg_tempPoint)
    For each (Integer A) from 1 to (Random integer number between 1 and 5), do (Actions)
      Loop - Actions
        Set VariableSet tempPoint = (Random point in (Playable map area))
        Item - Create Barricade at tempPoint
        Custom script: call RemoveLocation(udg_tempPoint)
    For each (Integer A) from 1 to (Random integer number between 1 and 5), do (Actions)
      Loop - Actions
        Set VariableSet tempPoint = (Random point in (Playable map area))
        Item - Create Poison Bombs at tempPoint
        Custom script: call RemoveLocation(udg_tempPoint)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        level Greater than 1
      Then - Actions
        For each (Integer A) from 1 to (Random integer number between 1 and 5), do (Actions)
          Loop - Actions
            Set VariableSet tempPoint = (Random point in (Playable map area))
            Item - Create Stimpack at tempPoint
            Custom script: call RemoveLocation(udg_tempPoint)
      Else - Actions
spawn
  Events
    Time - Every 45.00 seconds of game time
  Conditions
  Actions
    For each (Integer B) from 0 to 3, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            unitCount[(Integer B)] Less than or equal to 52
          Then - Actions
            Set VariableSet unitCount[(Integer B)] = (unitCount[(Integer B)] + 8)
            For each (Integer A) from 0 to 7, do (Actions)
              Loop - Actions
                Set VariableSet tempPoint = (Center of spawnPoints[(Integer A)])
                Unit - Create 1.spawnType for enemyPlayers[(Integer B)] at tempPoint facing Default building facing degrees
                Unit Group - Add (Last created unit) to badGroup
                Custom script: call RemoveLocation(udg_tempPoint)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Random integer number between 1 and 100) Less than or equal to ((deaths + 4) + (difficultyIndex x 2))
                  Then - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        level Equal to 1
                      Then - Actions
                        Unit - Replace (Last created unit) with a Elite Zergling (1) using The old unit's relative life and mana
                      Else - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        level Equal to 2
                      Then - Actions
                        Unit - Replace (Last created unit) with a Elite Zergling (2) using The old unit's relative life and mana
                      Else - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        level Equal to 3
                      Then - Actions
                        Unit - Replace (Last created unit) with a Elite Zergling (3) using The old unit's relative life and mana
                      Else - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        level Equal to 4
                      Then - Actions
                        Unit - Replace (Last created unit) with a Elite Zergling (4) using The old unit's relative life and mana
                      Else - Actions
                  Else - Actions
          Else - Actions
    Trigger - Run enemyAttack <gen> (checking conditions)
attack
  Events
    Unit - A unit Is attacked
  Conditions
    (Unit-type of (Attacking unit)) Equal to Marine
  Actions
    Set VariableSet tempInt = (Charges remaining in (Item carried by (Attacking unit) of type Ammo))
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        tempInt Equal to 0
      Then - Actions
        Unit - Order (Attacking unit) to Stop.
      Else - Actions
        Item - Set charges remaining in (Item carried by (Attacking unit) of type Ammo) to ((Charges remaining in (Item carried by (Attacking unit) of type Ammo)) - 1)
stackItem
  Events
    Unit - A unit Acquires an item
  Conditions
    (Item-class of (Item being manipulated)) Equal to Charged
  Actions
    Set VariableSet tempUnit = (Hero manipulating item)
    Set VariableSet tempItem = (Item being manipulated)
    Set VariableSet tempItemType = (Item-type of tempItem)
    Set VariableSet tempInt = (Charges remaining in tempItem)
    For each (Integer A) from 1 to 6, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Item-type of tempItem) Equal to (Item-type of (Item carried by tempUnit in slot (Integer A)))
            tempItem Not equal to (Item carried by tempUnit in slot (Integer A))
          Then - Actions
            Set VariableSet tempInt = ((Charges remaining in (Item carried by tempUnit in slot (Integer A))) + tempInt)
            Set VariableSet activeItem = (Item carried by tempUnit in slot (Integer A))
            Item - Set charges remaining in activeItem to tempInt
            Item - Remove tempItem
            Set VariableSet tempItem = activeItem
          Else - Actions
deathZerg
  Events
    Unit - A unit Dies
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Unit-type of (Dying unit)) Equal to Zergling (1)
        (Unit-type of (Dying unit)) Equal to Zergling (2)
        (Unit-type of (Dying unit)) Equal to Zergling (3)
        (Unit-type of (Dying unit)) Equal to Zergling (4)
  Actions
    Unit Group - Remove (Dying unit) from badGroup.
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Owner of (Dying unit)) Equal to Player 20 (Lavender)
      Then - Actions
        Set VariableSet unitCount[0] = (unitCount[0] - 1)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Owner of (Dying unit)) Equal to Player 21 (Coal)
      Then - Actions
        Set VariableSet unitCount[1] = (unitCount[1] - 1)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Owner of (Dying unit)) Equal to Player 22 (Snow)
      Then - Actions
        Set VariableSet unitCount[2] = (unitCount[2] - 1)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Owner of (Dying unit)) Equal to Player 23 (Emerald)
      Then - Actions
        Set VariableSet unitCount[3] = (unitCount[3] - 1)
      Else - Actions
deathBoss
  Events
    Unit - A unit Dies
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Unit-type of (Dying unit)) Equal to Hydralisk (1)
        (Unit-type of (Dying unit)) Equal to Hydralisk (2)
        (Unit-type of (Dying unit)) Equal to Hydralisk (3)
        (Unit-type of (Dying unit)) Equal to Hydralisk (4)
  Actions
    Unit Group - Remove (Dying unit) from bossGroup.
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Dying unit)) Equal to Hydralisk (1)
      Then - Actions
        For each (Integer A) from 1 to 10, do (Actions)
          Loop - Actions
            Set VariableSet tempPoint = ((Position of (Dying unit)) offset by ((Random real number between -200.00 and 200.00), (Random real number between -200.00 and 200.00)))
            Item - Create Gold Coins at tempPoint
            Custom script: call RemoveLocation(udg_tempPoint)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Dying unit)) Equal to Hydralisk (2)
      Then - Actions
        For each (Integer A) from 1 to 25, do (Actions)
          Loop - Actions
            Set VariableSet tempPoint = ((Position of (Dying unit)) offset by ((Random real number between -200.00 and 200.00), (Random real number between -200.00 and 200.00)))
            Item - Create Gold Coins at tempPoint
            Custom script: call RemoveLocation(udg_tempPoint)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Dying unit)) Equal to Hydralisk (3)
      Then - Actions
        For each (Integer A) from 1 to 50, do (Actions)
          Loop - Actions
            Set VariableSet tempPoint = ((Position of (Dying unit)) offset by ((Random real number between -200.00 and 200.00), (Random real number between -200.00 and 200.00)))
            Item - Create Gold Coins at tempPoint
            Custom script: call RemoveLocation(udg_tempPoint)
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Unit-type of (Dying unit)) Equal to Hydralisk (4)
      Then - Actions
        Trigger - Run victory <gen> (checking conditions)
      Else - Actions
victory
  Events
  Conditions
  Actions
    For each (Integer A) from 1 to maxPlayers, do (Actions)
      Loop - Actions
        Game - Victory (Player((Integer A))) (Show dialogs, Show scores)
leave
  Events
  Conditions
  Actions
    Unit - Remove marines[((Player number of (Triggering player)) - 1)] from the game
enemyAttack
  Events
    Time - Every 60.00 seconds of game time
  Conditions
  Actions
    Unit Group - Pick every unit in badGroup and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Issued order) Equal to (Order(none))
          Then - Actions
            Set VariableSet tempInt = 0
            Set VariableSet tempPoint = (Position of (Picked unit))
            Set VariableSet tempGroup = (Units within 500.00 of tempPoint matching ((Unit-type of (Matching unit)) Equal to Marine).)
            Set VariableSet tempPoint2 = (Position of (Random unit from tempGroup))
            Set VariableSet tempInt = (Number of units in tempGroup)
            Custom script: call DestroyGroup(udg_tempGroup)
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                tempInt Equal to 0
              Then - Actions
                Set VariableSet tempGroup = (Units within 1000.00 of tempPoint matching ((Unit-type of (Matching unit)) Equal to Marine).)
                Custom script: call RemoveLocation(udg_tempPoint2)
                Set VariableSet tempPoint2 = (Position of (Random unit from tempGroup))
                Set VariableSet tempInt = (Number of units in tempGroup)
                Custom script: call DestroyGroup(udg_tempGroup)
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                tempInt Equal to 0
              Then - Actions
                Custom script: call RemoveLocation(udg_tempPoint2)
                Set VariableSet tempPoint2 = (Position of (Random unit from marineGroup))
              Else - Actions
            Unit - Order (Picked unit) to Attack-Move To.tempPoint2
            Custom script: call RemoveLocation(udg_tempPoint)
            Custom script: call RemoveLocation(udg_tempPoint2)
          Else - Actions
bossAttack
  Events
    Time - Every 15.00 seconds of game time
  Conditions
  Actions
    Unit Group - Pick every unit in bossGroup and do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Issued order) Equal to (Order(none))
          Then - Actions
            Set VariableSet tempInt = 0
            Set VariableSet tempPoint = (Position of (Picked unit))
            Set VariableSet tempGroup = (Units within 500.00 of tempPoint matching ((Unit-type of (Matching unit)) Equal to Marine).)
            Set VariableSet tempPoint2 = (Position of (Random unit from tempGroup))
            Set VariableSet tempInt = (Number of units in tempGroup)
            Custom script: call DestroyGroup(udg_tempGroup)
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                tempInt Equal to 0
              Then - Actions
                Set VariableSet tempGroup = (Units within 1000.00 of tempPoint matching ((Unit-type of (Matching unit)) Equal to Marine).)
                Custom script: call RemoveLocation(udg_tempPoint2)
                Set VariableSet tempPoint2 = (Position of (Random unit from tempGroup))
                Set VariableSet tempInt = (Number of units in tempGroup)
                Custom script: call DestroyGroup(udg_tempGroup)
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                tempInt Equal to 0
              Then - Actions
                Custom script: call RemoveLocation(udg_tempPoint2)
                Set VariableSet tempPoint2 = (Position of (Random unit from marineGroup))
              Else - Actions
            Unit - Order (Picked unit) to Attack-Move To.tempPoint2
            Custom script: call RemoveLocation(udg_tempPoint)
            Custom script: call RemoveLocation(udg_tempPoint2)
          Else - Actions
createDifficultyDialog
  Events
    Time - Elapsed game time is 0.00 seconds
  Conditions
  Actions
    Dialog - Change the title of difficultyDialog to Select Difficulty
    Set VariableSet difficultyStrings[0] = |c00C0FFC0Private|r
    Set VariableSet difficultyStrings[1] = |c00B5A0E0Officer|r
    Set VariableSet difficultyStrings[2] = |cffff9696Captain|r
    Set VariableSet difficultyStrings[3] = |cffff0000Lieutenant|r
    Set VariableSet difficultyStrings[4] = |cff800000Elite General|r
    For each (Integer A) from 0 to 4, do (Actions)
      Loop - Actions
        Dialog - Create a dialog button for difficultyDialog labelled difficultyStrings[(Integer A)]
        Set VariableSet difficultyButton[(Integer A)] = (Last created dialog Button)
    Dialog - Show difficultyDialog for Player 1 (Red)
difficultyButtonClicked
  Events
    Dialog - A dialog button is clicked for difficultyDialog
  Conditions
  Actions
    For each (Integer A) from 0 to 4, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Clicked dialog button) Equal to difficultyButton[(Integer A)]
          Then - Actions
            Set VariableSet difficultyVotes[(Integer A)] = (difficultyVotes[(Integer A)] + 1)
          Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Clicked dialog button) Equal to difficultyButton[(Integer A)]
            (Triggering player) Equal to Player 1 (Red)
          Then - Actions
            Set VariableSet difficultyVotes[(Integer A)] = (difficultyVotes[(Integer A)] + 2)
          Else - Actions
setDifficulty
  Events
    Time - Elapsed game time is 15.00 seconds
  Conditions
  Actions
    Set VariableSet tempInt = 0
    For each (Integer A) from 0 to 4, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            difficultyVotes[(Integer A)] Greater than tempInt
          Then - Actions
            Set VariableSet tempInt = difficultyVotes[(Integer A)]
            Set VariableSet difficultyIndex = (Integer A)
          Else - Actions
    Game - Display to players the text: ( + (Difficulty Selected: + difficultyStrings[difficultyIndex]))
    For each (Integer A) from 0 to 3, do (Actions)
      Loop - Actions
        Player - Set the current research level of R008 (techcode) to difficultyIndex for enemyPlayers[(Integer A)]
        Set VariableSet energyIncrease = (30 - (difficultyIndex x 5))
    For each (Integer A) from 1 to maxPlayers, do (Actions)
      Loop - Actions
        Player - Set the current research level of R009 (techcode) to (5 - difficultyIndex) for (Player((Integer A)))
    Countdown Timer - Start roundTimer as a One-shot timer that will expire in (30.00 - ((Real(difficultyIndex)) x 5.00)) seconds
    Set VariableSet roundTimerWindow = (Last created timer window)
collectAmmoTip
  Events
    Time - Elapsed game time is 5 seconds
  Conditions
  Actions
    Game - Display to (All players) for 30 seconds the text: Collect ammo and lay barricades to survive
itemShopTip
  Events
    Time - Elapsed game time is 35.00 seconds
  Conditions
  Actions
    Game - Display to (All players) for 30 seconds the text: Purchase ammo, weapons, abilities and upgrades at the center shop.
supplyTip
  Events
    Time - Elapsed game time is 65.00 seconds
  Conditions
  Actions
    Game - Display to (All players) for 30 seconds the text: Some items at the shop require supplies which is given over time, and can be increased.
start
  Events
    Time - roundTimer expires
  Conditions
    level Equal to 1
  Actions
    Set VariableSet waveOn = True
    Trigger - Turn off (This trigger)
    Set VariableSet spawnType = Zergling (1)
    Trigger - Run spawn <gen> (checking conditions)
    Trigger - Turn on spawn <gen>
    Countdown Timer - Start roundTimer as a One-shot timer that will expire in 300.00 seconds
    Wait 1.00 seconds
    Trigger - Turn on stop <gen>
stop
  Events
    Time - roundTimer expires
  Conditions
    level Equal to 1
  Actions
    Set VariableSet waveOn = False
    Trigger - Turn off (This trigger)
    Trigger - Turn off spawn <gen>
    Trigger - Run spawn <gen> (checking conditions)
    Trigger - Run spawn <gen> (checking conditions)
    Trigger - Run spawn <gen> (checking conditions)
    Set VariableSet tempPoint = (Center of spawnPoints[(Integer B)])
    Unit - Create 1.Hydralisk (1) for Player 23 (Emerald) at tempPoint facing Default building facing degrees
    Unit - Add Endurance Aura to (Last created unit)
    Unit - Set level of Endurance Aura for (Last created unit) to (level + difficultyIndex)
    Unit Group - Add (Last created unit) to bossGroup
    Custom script: call RemoveLocation(udg_tempPoint)
    Set VariableSet tempPoint = (Center of playerSpawn <gen>)
    Unit - Order (Last created unit) to Attack-Move To.tempPoint
    Custom script: call RemoveLocation(udg_tempPoint)
    Trigger - Run createSupplies <gen> (checking conditions)
    Countdown Timer - Start roundTimer as a One-shot timer that will expire in 180.00 seconds
    Wait 1.00 seconds
    Trigger - Turn on start2 <gen>
    Set VariableSet level = (level + 1)
start2
  Events
    Time - roundTimer expires
  Conditions
    level Equal to 2
  Actions
    Set VariableSet waveOn = True
    Trigger - Turn off (This trigger)
    Set VariableSet spawnType = Zergling (2)
    Trigger - Run spawn <gen> (checking conditions)
    Trigger - Turn on spawn <gen>
    Countdown Timer - Start roundTimer as a One-shot timer that will expire in 300.00 seconds
    Wait 1.00 seconds
    Trigger - Turn on stop2 <gen>
stop2
  Events
    Time - roundTimer expires
  Conditions
    level Equal to 2
  Actions
    Set VariableSet waveOn = False
    Trigger - Turn off (This trigger)
    Trigger - Turn off spawn <gen>
    Trigger - Run spawn <gen> (checking conditions)
    Trigger - Run spawn <gen> (checking conditions)
    Trigger - Run spawn <gen> (checking conditions)
    Set VariableSet tempPoint = (Center of spawnPoints[(Integer B)])
    Unit - Create 1.Hydralisk (2) for Player 23 (Emerald) at tempPoint facing Default building facing degrees
    Unit - Add Endurance Aura to (Last created unit)
    Unit - Set level of Endurance Aura for (Last created unit) to (level + difficultyIndex)
    Unit Group - Add (Last created unit) to bossGroup
    Custom script: call RemoveLocation(udg_tempPoint)
    Set VariableSet tempPoint = (Center of playerSpawn <gen>)
    Unit - Order (Last created unit) to Attack-Move To.tempPoint
    Custom script: call RemoveLocation(udg_tempPoint)
    Trigger - Run createSupplies <gen> (checking conditions)
    Countdown Timer - Start roundTimer as a One-shot timer that will expire in 220.00 seconds
    Wait 1.00 seconds
    Trigger - Turn on start3 <gen>
    Set VariableSet level = (level + 1)
start3
  Events
    Time - roundTimer expires
  Conditions
    level Equal to 3
  Actions
    Set VariableSet waveOn = True
    Trigger - Turn off (This trigger)
    Set VariableSet spawnType = Zergling (3)
    Trigger - Run spawn <gen> (checking conditions)
    Trigger - Turn on spawn <gen>
    Countdown Timer - Start roundTimer as a One-shot timer that will expire in 300.00 seconds
    Wait 1.00 seconds
    Trigger - Turn on stop3 <gen>
stop3
  Events
    Time - roundTimer expires
  Conditions
    level Equal to 3
  Actions
    Set VariableSet waveOn = False
    Set VariableSet finalWave = True
    Trigger - Turn off (This trigger)
    Trigger - Turn off spawn <gen>
    Trigger - Run spawn <gen> (checking conditions)
    Trigger - Run spawn <gen> (checking conditions)
    Trigger - Run spawn <gen> (checking conditions)
    Set VariableSet tempPoint = (Center of spawnPoints[(Integer B)])
    Unit - Create 1.Hydralisk (3) for Player 23 (Emerald) at tempPoint facing Default building facing degrees
    Unit - Add Endurance Aura to (Last created unit)
    Unit - Set level of Endurance Aura for (Last created unit) to (level + difficultyIndex)
    Unit Group - Add (Last created unit) to bossGroup
    Custom script: call RemoveLocation(udg_tempPoint)
    Set VariableSet tempPoint = (Center of playerSpawn <gen>)
    Unit - Order (Last created unit) to Attack-Move To.tempPoint
    Custom script: call RemoveLocation(udg_tempPoint)
    Trigger - Run createSupplies <gen> (checking conditions)
    Countdown Timer - Start roundTimer as a One-shot timer that will expire in 260.00 seconds
    Wait 1.00 seconds
    Trigger - Turn on start4 <gen>
    Set VariableSet level = (level + 1)
start4
  Events
    Time - roundTimer expires
  Conditions
    level Equal to 4
  Actions
    Set VariableSet waveOn = True
    Trigger - Turn off (This trigger)
    Set VariableSet spawnType = Zergling (4)
    Trigger - Run spawn <gen> (checking conditions)
    Trigger - Turn on spawn <gen>
    Countdown Timer - Start roundTimer as a One-shot timer that will expire in 360.00 seconds
    Wait 1.00 seconds
    Trigger - Turn on stop4 <gen>
stop4
  Events
    Time - roundTimer expires
  Conditions
    level Equal to 4
  Actions
    Set VariableSet waveOn = False
    Trigger - Run spawn <gen> (checking conditions)
    Trigger - Run spawn <gen> (checking conditions)
    Trigger - Run spawn <gen> (checking conditions)
    Countdown Timer - Destroy roundTimerWindow
    Set VariableSet tempPoint = (Center of spawnPoints[(Integer B)])
    Unit - Create 1.Hydralisk (4) for Player 23 (Emerald) at tempPoint facing Default building facing degrees
    Unit - Add Endurance Aura to (Last created unit)
    Unit - Set level of Endurance Aura for (Last created unit) to (level + difficultyIndex)
    Unit Group - Add (Last created unit) to bossGroup
    Custom script: call RemoveLocation(udg_tempPoint)
    Set VariableSet tempPoint = (Center of playerSpawn <gen>)
    Unit - Order (Last created unit) to Attack-Move To.tempPoint
    Custom script: call RemoveLocation(udg_tempPoint)
addRockets
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Rockets
  Actions
    Set VariableSet tempInt = ((Player number of (Owner of (Buying unit))) - 1)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        hasRockets[tempInt] Equal to False
      Then - Actions
        Set VariableSet hasRockets[tempInt] = True
        Unit - Add Rockets to (Buying unit)
      Else - Actions
        Set VariableSet tempPlayers = (Player group((Player((tempInt + 1)))))
        Game - Display to tempPlayers the text: You already have that ability
        Custom script: call DestroyForce(udg_tempPlayers)
        Player - Add 3 to (Player((tempInt + 1))).Current lumber
addHide
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Hide
  Actions
    Set VariableSet tempInt = ((Player number of (Owner of (Buying unit))) - 1)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        hasDefensive[tempInt] Equal to False
      Then - Actions
        Set VariableSet hasDefensive[tempInt] = True
        Unit - Add Hide to (Buying unit)
      Else - Actions
        Set VariableSet tempPlayers = (Player group((Player((tempInt + 1)))))
        Game - Display to tempPlayers the text: You already have a defensive ability.
        Custom script: call DestroyForce(udg_tempPlayers)
        Player - Add 1 to (Player((tempInt + 1))).Current lumber
addHeal
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Heal
  Actions
    Set VariableSet tempInt = ((Player number of (Owner of (Buying unit))) - 1)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        hasHeal[tempInt] Equal to False
      Then - Actions
        Set VariableSet hasHeal[tempInt] = True
        Unit - Add Heal to (Buying unit)
      Else - Actions
        Set VariableSet tempPlayers = (Player group((Player((tempInt + 1)))))
        Game - Display to tempPlayers the text: You already have that ability
        Custom script: call DestroyForce(udg_tempPlayers)
        Player - Add 2 to (Player((tempInt + 1))).Current lumber
addRest
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Rest
  Actions
    Set VariableSet tempInt = ((Player number of (Owner of (Buying unit))) - 1)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        hasRest[tempInt] Equal to False
      Then - Actions
        Set VariableSet hasRest[tempInt] = True
        Unit - Add Rest to (Buying unit)
      Else - Actions
        Set VariableSet tempPlayers = (Player group((Player((tempInt + 1)))))
        Game - Display to tempPlayers the text: You already have that ability
        Custom script: call DestroyForce(udg_tempPlayers)
        Player - Add 2 to (Player((tempInt + 1))).Current lumber
addEnrage
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Enrage
  Actions
    Set VariableSet tempInt = ((Player number of (Owner of (Buying unit))) - 1)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        hasEnrage[tempInt] Equal to False
      Then - Actions
        Set VariableSet hasEnrage[tempInt] = True
        Unit - Add Enrage to (Buying unit)
      Else - Actions
        Set VariableSet tempPlayers = (Player group((Player((tempInt + 1)))))
        Game - Display to tempPlayers the text: You already have that ability
        Custom script: call DestroyForce(udg_tempPlayers)
        Player - Add 2 to (Player((tempInt + 1))).Current lumber
addEnergyShield
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Energy Shield
  Actions
    Set VariableSet tempInt = ((Player number of (Owner of (Buying unit))) - 1)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        hasDefensive[tempInt] Equal to False
      Then - Actions
        Set VariableSet hasDefensive[tempInt] = True
        Unit - Add Energy Shield to (Buying unit)
      Else - Actions
        Set VariableSet tempPlayers = (Player group((Player((tempInt + 1)))))
        Game - Display to tempPlayers the text: You already have a defensive ability.
        Custom script: call DestroyForce(udg_tempPlayers)
        Player - Add 1 to (Player((tempInt + 1))).Current lumber
addTeleport
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Teleport
  Actions
    Set VariableSet tempInt = ((Player number of (Owner of (Buying unit))) - 1)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        hasDefensive[tempInt] Equal to False
      Then - Actions
        Set VariableSet hasDefensive[tempInt] = True
        Unit - Add Teleport to (Buying unit)
      Else - Actions
        Set VariableSet tempPlayers = (Player group((Player((tempInt + 1)))))
        Game - Display to tempPlayers the text: You already have a defensive ability.
        Custom script: call DestroyForce(udg_tempPlayers)
        Player - Add 1 to (Player((tempInt + 1))).Current lumber
accuracy
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Upgrade Accuracy
  Actions
    Hero - Modify Agility of marines[((Player number of (Owner of (Buying unit))) - 1)]: Add 2.
endurance
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Upgrade Endurance
  Actions
    Hero - Modify Strength of marines[((Player number of (Owner of (Buying unit))) - 1)]: Add 3.
stamina
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Upgrade Stamina
  Actions
    Hero - Modify Intelligence of marines[((Player number of (Owner of (Buying unit))) - 1)]: Add 3.
captainsFlagGain
  Events
    Unit - A unit Acquires an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Captains Flag
  Actions
    Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Hero manipulating item))) + is the captain!)
    Hero - Set Name of (Hero manipulating item) to Captain
captainsFlagRemove
  Events
    Unit - A unit Loses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Captains Flag
  Actions
    Hero - Set Name of (Hero manipulating item) to Marine
sniperGain
  Events
    Unit - A unit Acquires an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Sniper Rifle
  Actions
    Set VariableSet upgradeType = R000 (techcode)
    Set VariableSet amount = 5
    Player - Set the current research level of R000 (techcode) to ((Current research level of upgradeType for (Owner of (Hero manipulating item))) + amount) for (Owner of (Hero manipulating item))
sniperRemove
  Events
    Unit - A unit Loses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Sniper Rifle
  Actions
    Set VariableSet upgradeType = R000 (techcode)
    Set VariableSet amount = 5
    Player - Set the current research level of R000 (techcode) to ((Current research level of upgradeType for (Owner of (Hero manipulating item))) - amount) for (Owner of (Hero manipulating item))
sniperRifleScopeGain
  Events
    Unit - A unit Acquires an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Sniper Rifle + Scope
  Actions
    Set VariableSet upgradeType = R000 (techcode)
    Set VariableSet amount = 7
    Player - Set the current research level of R000 (techcode) to ((Current research level of upgradeType for (Owner of (Hero manipulating item))) + amount) for (Owner of (Hero manipulating item))
sniperRifleScopeRemove
  Events
    Unit - A unit Loses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Sniper Rifle + Scope
  Actions
    Set VariableSet upgradeType = R000 (techcode)
    Set VariableSet amount = 7
    Player - Set the current research level of R000 (techcode) to ((Current research level of upgradeType for (Owner of (Hero manipulating item))) - amount) for (Owner of (Hero manipulating item))
pistolGain
  Events
    Unit - A unit Acquires an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Pistol
  Actions
    Set VariableSet abilityType = Evasion
    Set VariableSet amount = 2
    Set VariableSet tempUnit = (Hero manipulating item)
    Unit - Set level of abilityType for tempUnit to ((Level of abilityType for tempUnit) + amount)
pistolRemove
  Events
    Unit - A unit Loses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Pistol
  Actions
    Set VariableSet abilityType = Evasion
    Set VariableSet amount = 2
    Set VariableSet tempUnit = (Hero manipulating item)
    Unit - Set level of abilityType for tempUnit to ((Level of abilityType for tempUnit) - amount)
dualPistolGain
  Events
    Unit - A unit Acquires an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Double Pistols
  Actions
    Set VariableSet abilityType = Evasion
    Set VariableSet amount = 4
    Set VariableSet tempUnit = (Hero manipulating item)
    Unit - Set level of abilityType for tempUnit to ((Level of abilityType for tempUnit) + amount)
dualPistolRemove
  Events
    Unit - A unit Loses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Double Pistols
  Actions
    Set VariableSet abilityType = Evasion
    Set VariableSet amount = 4
    Set VariableSet tempUnit = (Hero manipulating item)
    Unit - Set level of abilityType for tempUnit to ((Level of abilityType for tempUnit) - amount)
shotgunGain
  Events
    Unit - A unit Acquires an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Shotgun
  Actions
    Set VariableSet abilityType = Headshot
    Set VariableSet amount = 3
    Set VariableSet tempUnit = (Hero manipulating item)
    Unit - Set level of abilityType for tempUnit to ((Level of abilityType for tempUnit) + amount)
shotgunRemove
  Events
    Unit - A unit Loses an item
  Conditions
    (Item-type of (Item being manipulated)) Equal to Shotgun
  Actions
    Set VariableSet abilityType = Headshot
    Set VariableSet amount = 3
    Set VariableSet tempUnit = (Hero manipulating item)
    Unit - Set level of abilityType for tempUnit to ((Level of abilityType for tempUnit) - amount)
alienBoots
  Events
    Unit - A unit Acquires an item
  Conditions
  Actions
    Set VariableSet itemA = Gym Boots
    Set VariableSet itemB = Alien Artifact
    Set VariableSet itemD = Alien Boots
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Item carried by (Triggering unit) of type itemA) is owned) Equal to True
        ((Item carried by (Triggering unit) of type itemB) is owned) Equal to True
      Then - Actions
        Item - Remove (Item carried by (Triggering unit) of type itemA)
        Item - Remove (Item carried by (Triggering unit) of type itemB)
        Hero - Create itemD and give it to (Triggering unit)
      Else - Actions
sniperScope
  Events
    Unit - A unit Acquires an item
  Conditions
  Actions
    Set VariableSet itemA = Sniper Rifle
    Set VariableSet itemB = Sniper Scope
    Set VariableSet itemD = Sniper Rifle + Scope
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Item carried by (Triggering unit) of type itemA) is owned) Equal to True
        ((Item carried by (Triggering unit) of type itemB) is owned) Equal to True
      Then - Actions
        Item - Remove (Item carried by (Triggering unit) of type itemA)
        Item - Remove (Item carried by (Triggering unit) of type itemB)
        Hero - Create itemD and give it to (Triggering unit)
      Else - Actions
marineSet
  Events
    Unit - A unit Acquires an item
  Conditions
  Actions
    Set VariableSet itemA = Armor
    Set VariableSet itemB = Helmet
    Set VariableSet itemC = Work Boots
    Set VariableSet itemD = Marine Set
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Item carried by (Triggering unit) of type itemA) is owned) Equal to True
        ((Item carried by (Triggering unit) of type itemB) is owned) Equal to True
        ((Item carried by (Triggering unit) of type itemC) is owned) Equal to True
      Then - Actions
        Item - Remove (Item carried by (Triggering unit) of type itemA)
        Item - Remove (Item carried by (Triggering unit) of type itemB)
        Item - Remove (Item carried by (Triggering unit) of type itemC)
        Hero - Create itemD and give it to (Triggering unit)
      Else - Actions
doublePistols
  Events
    Unit - A unit Acquires an item
  Conditions
  Actions
    Set VariableSet itemA = Pistol
    Set VariableSet itemD = Double Pistols
    Set VariableSet tempInt = 0
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Item-type of (Item being manipulated)) Equal to itemA
      Then - Actions
        For each (Integer A) from 1 to 6, do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to itemA
              Then - Actions
                Set VariableSet tempInt = (tempInt + 1)
              Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            tempInt Equal to 2
          Then - Actions
            For each (Integer A) from 1 to 6, do (Actions)
              Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to itemA
                  Then - Actions
                    Item - Remove (Item carried by (Hero manipulating item) in slot (Integer A))
                  Else - Actions
            Hero - Create itemD and give it to (Hero manipulating item)
          Else - Actions
      Else - Actions
doubleUzi
  Events
    Unit - A unit Acquires an item
  Conditions
  Actions
    Set VariableSet itemA = Uzi
    Set VariableSet itemD = Double Uzi's
    Set VariableSet tempInt = 0
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Item-type of (Item being manipulated)) Equal to itemA
      Then - Actions
        For each (Integer A) from 1 to 6, do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to itemA
              Then - Actions
                Set VariableSet tempInt = (tempInt + 1)
              Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            tempInt Equal to 2
          Then - Actions
            For each (Integer A) from 1 to 6, do (Actions)
              Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to itemA
                  Then - Actions
                    Item - Remove (Item carried by (Hero manipulating item) in slot (Integer A))
                  Else - Actions
            Hero - Create itemD and give it to (Hero manipulating item)
          Else - Actions
      Else - Actions
nuclearBomb
  Events
    Unit - A unit Acquires an item
  Conditions
  Actions
    Set VariableSet itemA = Ultimate BFG
    Set VariableSet itemD = Nuclear Bomb
    Set VariableSet tempInt = 0
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Item-type of (Item being manipulated)) Equal to itemA
      Then - Actions
        For each (Integer A) from 1 to 6, do (Actions)
          Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to itemA
              Then - Actions
                Set VariableSet tempInt = (tempInt + 1)
              Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            tempInt Equal to 3
          Then - Actions
            For each (Integer A) from 1 to 6, do (Actions)
              Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to itemA
                  Then - Actions
                    Item - Remove (Item carried by (Hero manipulating item) in slot (Integer A))
                  Else - Actions
            Hero - Create itemD and give it to (Hero manipulating item)
          Else - Actions
      Else - Actions
addSkillPoint
  Events
    Unit - A unit Gains a level
  Conditions
  Actions
    Player - Add 1 to (Owner of (Triggering unit)).Current lumber
enduranceUp
  Events
    Unit - A unit Gains a level
  Conditions
    (((Hero level of (Leveling Hero)) + 1) mod 3) Equal to 0
  Actions
    Hero - Modify Strength of (Leveling Hero): Add 1.
    Set VariableSet tempPlayers = (Player group((Owner of (Leveling Hero))))
    Game - Display to tempPlayers the text: +1 Endurance
    Custom script: call DestroyForce(udg_tempPlayers)
accuracyUp
  Events
    Unit - A unit Gains a level
  Conditions
    (((Hero level of (Leveling Hero)) + 0) mod 3) Equal to 0
  Actions
    Hero - Modify Agility of (Leveling Hero): Add 1.
    Set VariableSet tempPlayers = (Player group((Owner of (Leveling Hero))))
    Game - Display to tempPlayers the text: +1 Accuracy
    Custom script: call DestroyForce(udg_tempPlayers)
staminaUp
  Events
    Unit - A unit Gains a level
  Conditions
    (((Hero level of (Leveling Hero)) + 2) mod 3) Equal to 0
  Actions
    Hero - Modify Intelligence of (Leveling Hero): Add 1.
    Set VariableSet tempPlayers = (Player group((Owner of (Leveling Hero))))
    Game - Display to tempPlayers the text: +1 Stamina
    Custom script: call DestroyForce(udg_tempPlayers)
headshotUp
  Events
    Unit - A unit Gains a level
  Conditions
    (((Hero level of (Leveling Hero)) + 0) mod 5) Equal to 0
  Actions
    Unit - Set level of Headshot for (Leveling Hero) to ((Level of Headshot for (Leveling Hero)) + 1)
    Set VariableSet tempPlayers = (Player group((Owner of (Leveling Hero))))
    Game - Display to tempPlayers the text: You have gained 5 levels and gain +1 headshot ability
    Custom script: call DestroyForce(udg_tempPlayers)
movementSpeedUp
  Events
    Unit - A unit Gains a level
  Conditions
    (Hero level of (Hero manipulating item)) Equal to 10
  Actions
    Unit - Set (Leveling Hero) movement speed to ((Current movement speed of (Hero manipulating item)) + 25.00)
    Set VariableSet tempPlayers = (Player group((Owner of (Leveling Hero))))
    Game - Display to tempPlayers the text: You have reached level 10 and gained +25 Movement speed
    Custom script: call DestroyForce(udg_tempPlayers)
improvedBarricades
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Improved Barricades
  Actions
    Set VariableSet tempString = Improved Barricades
    Set VariableSet tempItemType = Improved Barricades
    Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Buying unit))) + ( has purchased + tempString))
    Set VariableSet upgrades[tempInt] = True
    For each (Integer A) from 1 to maxPlayers, do (Actions)
      Loop - Actions
        Player - Set the current research level of Rhac (techcode) to 1 for (Player((Integer A)))
weaponUpgrades
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Weapon Upgrade
  Actions
    Set VariableSet tempString = Weapon Upgrade
    Set VariableSet upgradeType = R007 (techcode)
    Set VariableSet amount = 1
    Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Buying unit))) + ( has purchased + tempString))
    Set VariableSet upgrades[tempInt] = True
    For each (Integer A) from 1 to maxPlayers, do (Actions)
      Loop - Actions
        Player - Set the current research level of upgradeType to ((Current research level of upgradeType for (Player((Integer A)))) + amount) for (Player((Integer A)))
nanobotRegeneration
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Nanobot Regeneration
  Actions
    Set VariableSet tempString = Nanobot Regeneration
    Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Buying unit))) + ( has purchased + tempString))
    Set VariableSet upgrades[tempInt] = True
    For each (Integer A) from 1 to maxPlayers, do (Actions)
      Loop - Actions
        Player - Set the current research level of R003 (techcode) to 1 for (Player((Integer A)))
armorUpgrade
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Armor Upgrade
  Actions
    Set VariableSet tempString = Armor Upgrade
    Set VariableSet upgradeType = R004 (techcode)
    Set VariableSet amount = 1
    Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Buying unit))) + ( has purchased + tempString))
    Set VariableSet upgrades[tempInt] = True
    For each (Integer A) from 1 to maxPlayers, do (Actions)
      Loop - Actions
        Player - Set the current research level of upgradeType to ((Current research level of upgradeType for (Player((Integer A)))) + amount) for (Player((Integer A)))
sniperTraining
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Sniper Training
  Actions
    Set VariableSet tempString = Long Distance Training
    Set VariableSet upgradeType = R000 (techcode)
    Set VariableSet amount = 1
    Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Buying unit))) + ( has purchased + tempString))
    Set VariableSet upgrades[tempInt] = True
    For each (Integer A) from 1 to maxPlayers, do (Actions)
      Loop - Actions
        Player - Set the current research level of upgradeType to ((Current research level of upgradeType for (Player((Integer A)))) + amount) for (Player((Integer A)))
    For each (Integer A) from 0 to maxPlayers, do (Actions)
      Loop - Actions
        Set VariableSet tempUnit = marines[(Integer A)]
        Set VariableSet abilityType = Headshot
        Unit - Set level of abilityType for tempUnit to ((Level of abilityType for tempUnit) + 2)
exosuitUpgrade
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Exosuit Upgrade
  Actions
    Set VariableSet tempString = Robotic Legs
    Set VariableSet upgradeType = R006 (techcode)
    Set VariableSet amount = 1
    Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Buying unit))) + ( has purchased + tempString))
    Set VariableSet upgrades[tempInt] = True
    For each (Integer A) from 1 to maxPlayers, do (Actions)
      Loop - Actions
        Player - Set the current research level of upgradeType to ((Current research level of upgradeType for (Player((Integer A)))) + amount) for (Player((Integer A)))
marineUpgrades
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Marine Upgrades
  Actions
    Selection - Select Marine Upgrades 0028 <gen> for (Owner of (Buying unit))
buildingUpgrades
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Building Upgrades
  Actions
    Selection - Select Building Upgrades 0026 <gen> for (Owner of (Buying unit))
weapons
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Weapons
  Actions
    Selection - Select Weapons 0030 <gen> for (Owner of (Buying unit))
armor
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Armor
  Actions
    Selection - Select Armor 0029 <gen> for (Owner of (Buying unit))
marineAbilities
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Marine Abilities
  Actions
    Selection - Select Abilities 0027 <gen> for (Owner of (Buying unit))
addEnergy
  Events
    Time - Every 10.00 seconds of game time
  Conditions
  Actions
    Unit - Set mana of Ammo Dump 0024 <gen> to ((Mana of Ammo Dump 0024 <gen>) + (Real(energyIncrease)))
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        visionDisabled Equal to False
        (Integer((Mana of Ammo Dump 0024 <gen>))) Less than 100
      Then - Actions
        Game - Display to (All players) for 5.00 seconds the text: Warning! Power is critically low!
        Set VariableSet visionDisabled = True
        For each (Integer A) from 0 to maxPlayers, do (Actions)
          Loop - Actions
            Visibility - Disable visionPower[(Integer A)]
      Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        visionDisabled Equal to True
        (Integer((Mana of Ammo Dump 0024 <gen>))) Greater than or equal to 100
      Then - Actions
        Game - Display to (All players) for 5.00 seconds the text: Power back online!
        Set VariableSet visionDisabled = False
        For each (Integer A) from 0 to maxPlayers, do (Actions)
          Loop - Actions
            Visibility - Enable visionPower[(Integer A)]
      Else - Actions
addIncome
  Events
    Time - supplyTimer expires
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Integer((Mana of Ammo Dump 0024 <gen>))) Greater than or equal to incomeEnergyCost
      Then - Actions
        Unit - Set mana of Ammo Dump 0024 <gen> to ((Mana of Ammo Dump 0024 <gen>) - (Real(incomeEnergyCost)))
        Game - Display to (All players) for 5.00 seconds the text: (Gold Income Recieved: + (String(income)))
        Player Group - Pick every player in players and do (Actions)
          Loop - Actions
            Player - Add income to (Picked player).Current gold
      Else - Actions
        Game - Display to (All players) for 5.00 seconds the text: (Insufficient power available to generate income, Required Power: + (String(incomeEnergyCost)))
addSupplies
  Events
    Time - supplyTimer expires
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Integer((Mana of Ammo Dump 0024 <gen>))) Greater than or equal to supplyEnergyCost
      Then - Actions
        Unit - Set mana of Ammo Dump 0024 <gen> to ((Mana of Ammo Dump 0024 <gen>) - (Real(supplyEnergyCost)))
        Game - Display to (All players) for 5.00 seconds the text: ((String(supplyGen)) + supplies have been restocked)
        Item - Set charges remaining in (Item carried by Ammo Dump 0024 <gen> of type Supplies) to ((Charges remaining in (Item carried by Ammo Dump 0024 <gen> of type Supplies)) + supplyGen)
        For each (Integer A) from 1 to maxPlayers, do (Actions)
          Loop - Actions
            Player - Set (Player((Integer A))).Food used to (Charges remaining in (Item carried by Ammo Dump 0024 <gen> of type Supplies))
      Else - Actions
        Game - Display to (All players) for 5.00 seconds the text: (Insufficient power available to generate supplies, Required Power: + (String(supplyEnergyCost)))
purchaseSupplyItems
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Item-type of (Sold Item)) Equal to Ammo
        (Item-type of (Sold Item)) Equal to Medpack
        (Item-type of (Sold Item)) Equal to Barricade
        (Item-type of (Sold Item)) Equal to Poison Bombs
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Charges remaining in (Item carried by (Selling unit) of type Supplies)) Equal to 0
      Then - Actions
        Item - Remove (Sold Item)
        Set VariableSet tempPlayers = (Player group((Owner of (Buying unit))))
        Game - Display to tempPlayers the text: No supplies remaining.
        Custom script: call DestroyForce(udg_tempPlayers)
        Player - Add 50 to (Owner of (Buying unit)).Current gold
      Else - Actions
        Item - Set charges remaining in (Item carried by (Selling unit) of type Supplies) to ((Charges remaining in (Item carried by (Selling unit) of type Supplies)) - 1)
        For each (Integer A) from 1 to maxPlayers, do (Actions)
          Loop - Actions
            Player - Set (Player((Integer A))).Food used to (Charges remaining in (Item carried by (Selling unit) of type Supplies))
purchaseStimpack
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    Or - Any (Conditions) are true
      Conditions
        (Item-type of (Sold Item)) Equal to Stimpack
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Integer((Mana of Ammo Dump 0024 <gen>))) Greater than or equal to 50
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Charges remaining in (Item carried by (Selling unit) of type Supplies)) Equal to 0
          Then - Actions
            Item - Remove (Sold Item)
            Set VariableSet tempPlayers = (Player group((Owner of (Buying unit))))
            Game - Display to tempPlayers the text: No supplies remaining.
            Custom script: call DestroyForce(udg_tempPlayers)
            Player - Add 50 to (Owner of (Buying unit)).Current gold
          Else - Actions
            Unit - Set mana of Ammo Dump 0024 <gen> to ((Mana of Ammo Dump 0024 <gen>) - 50.00)
            Item - Set charges remaining in (Item carried by (Selling unit) of type Supplies) to ((Charges remaining in (Item carried by (Selling unit) of type Supplies)) - 1)
            For each (Integer A) from 1 to maxPlayers, do (Actions)
              Loop - Actions
                Player - Set (Player((Integer A))).Food used to (Charges remaining in (Item carried by (Selling unit) of type Supplies))
      Else - Actions
        Player - Add 50 to (Owner of (Buying unit)).Current gold
        Game - Display to (All players) for 5.00 seconds the text: (Insufficient power available to purchase stimpacks, Required Power: + 50)
        Item - Set charges remaining in (Sold Item) to ((Charges remaining in (Sold Item)) - 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Charges remaining in (Sold Item)) Equal to 0
          Then - Actions
            Item - Remove (Sold Item)
          Else - Actions
upgradeSupplyGenerator
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Supply Generator
  Actions
    Set VariableSet supplyGen = (supplyGen + 5)
    Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Buying unit))) + ( has upgraded the supply generator to: + (String(supplyGen))))
    Set VariableSet supplyEnergyCost = (supplyEnergyCost + 100)
upgradePowerGenerator
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Generator Upgrade
  Actions
    Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Buying unit))) + ( has upgraded the power generator. + ))
    Unit - Set Max Mana of Ammo Dump 0024 <gen> to ((Max Mana of Ammo Dump 0024 <gen>) + 100)
    Set VariableSet energyIncrease = (energyIncrease + 10)
upgradeIncome
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Income Upgrade
  Actions
    Set VariableSet income = (income + 50)
    Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Buying unit))) + ( has upgraded the gold income to: + (String(income))))
    Set VariableSet incomeEnergyCost = (incomeEnergyCost + 100)
upgradeTech
  Events
    Unit - A unit Sells an item (from shop)
  Conditions
    (Item-type of (Sold Item)) Equal to Tech Upgrade
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Integer((Mana of Ammo Dump 0024 <gen>))) Greater than or equal to 500
      Then - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            techLevel Less than 10
          Then - Actions
            Sound - Play StormBoltLaunch <gen>
            Unit - Set mana of Ammo Dump 0024 <gen> to ((Mana of Ammo Dump 0024 <gen>) - 500.00)
            Set VariableSet techLevel = (techLevel + 1)
            Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Buying unit))) + ( has upgraded Tech to level: + (String(techLevel))))
            Player - Set the current research level of R001 (techcode) to techLevel for Player 24 (Peanut)
          Else - Actions
            Sound - Play StormBoltLaunch <gen>
            Set VariableSet tempPlayers = (Player group((Owner of (Buying unit))))
            Game - Display to tempPlayers the text: Tech is already at max
            Custom script: call DestroyForce(udg_tempPlayers)
            Set VariableSet refundAmount = 500
            Player - Add refundAmount to (Owner of (Buying unit)).Current gold
      Else - Actions
        Set VariableSet refundAmount = 500
        Player - Add refundAmount to (Owner of (Buying unit)).Current gold
        Game - Display to (All players) for 5.00 seconds the text: (Insufficient power available to upgrade tech, Required Power: + 500)
create
  Events
    Time - Elapsed game time is 20.00 seconds
  Conditions
  Actions
    Multiboard - Create a multiboard with 2 columns and 9 rows, titled Stats.
    Set VariableSet multiboard = (Last created multiboard)
    Multiboard - Set the width for multiboard item in column 1, row 0 to 8.50% of the total screen width
    Multiboard - Set the width for multiboard item in column 2, row 0 to 7.00% of the total screen width
    Multiboard - Set the display style for (Last created multiboard) item in column 0, row 0 to Show text and Hide icons
    Multiboard - Set the text for multiboard item in column 1, row 1 to (Wave + ((String(level)) + :))
    Multiboard - Set the text for multiboard item in column 1, row 2 to Next Supplies:
    Multiboard - Set the text for multiboard item in column 1, row 3 to Tech Level
    Multiboard - Set the text for multiboard item in column 1, row 4 to Supplies:
    Multiboard - Set the text for multiboard item in column 1, row 5 to Supply Income:
    Multiboard - Set the text for multiboard item in column 1, row 6 to Gold Income:
    Multiboard - Set the text for multiboard item in column 1, row 7 to Current Power:
    Multiboard - Set the text for multiboard item in column 1, row 8 to Power Gen:
    Multiboard - Set the text for multiboard item in column 1, row 9 to Power Draw:
    Multiboard - Show (Last created multiboard)
    Trigger - Turn on updateMultiboard <gen>
    Trigger - Run updateMultiboard <gen> (checking conditions)
updateMultiboard
  Events
    Time - Every 1.00 seconds of game time
  Conditions
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        waveOn Equal to True
      Then - Actions
        Multiboard - Set the text for multiboard item in column 1, row 1 to (Wave + ((String(level)) + :))
      Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            finalWave Equal to True
          Then - Actions
            Multiboard - Set the text for multiboard item in column 1, row 1 to Final Wave:
          Else - Actions
            Multiboard - Set the text for multiboard item in column 1, row 1 to Next Wave:
    Multiboard - Set the text for multiboard item in column 2, row 1 to (String((Integer((Remaining time for roundTimer)))))
    Multiboard - Set the text for multiboard item in column 2, row 2 to (String((Integer((Remaining time for supplyTimer)))))
    Multiboard - Set the text for multiboard item in column 2, row 3 to (String(techLevel))
    Multiboard - Set the text for multiboard item in column 2, row 4 to (String((Charges remaining in (Item carried by Ammo Dump 0024 <gen> of type Supplies))))
    Multiboard - Set the text for multiboard item in column 2, row 5 to (String(supplyGen))
    Multiboard - Set the text for multiboard item in column 2, row 6 to (String(income))
    Multiboard - Set the text for multiboard item in column 2, row 7 to ((String((Integer((Mana of Ammo Dump 0024 <gen>))))) + (/ + (String((Integer((Max mana of Ammo Dump 0024 <gen>)))))))
    Multiboard - Set the text for multiboard item in column 2, row 8 to (String(energyIncrease))
    Multiboard - Set the text for multiboard item in column 2, row 9 to (String((incomeEnergyCost + supplyEnergyCost)))
marineRevive
  Events
  Conditions
  Actions
    For each (Integer A) from 0 to maxPlayers, do (Actions)
      Loop - Actions
        Set VariableSet tempInt = (Integer A)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            deadMarines[tempInt] Equal to True
            (Remaining time for deathTimer[tempInt]) Less than 1.00
          Then - Actions
            Unit - Set mana of Ammo Dump 0024 <gen> to ((Mana of Ammo Dump 0024 <gen>) - 100.00)
            Countdown Timer - Destroy timerWindows[tempInt]
            Set VariableSet deadMarines[tempInt] = False
            Set VariableSet tempPoint = (Random point in playerSpawn <gen>)
            Hero - Instantly revive marines[tempInt] at tempPoint, Show revival graphics
            Hero - Create Ammo and give it to marines[tempInt]
            Item - Set charges remaining in (Last created item) to 10
            Selection - Select marines[tempInt] for (Owner of marines[tempInt])
            Camera - Pan camera for (Owner of marines[tempInt]) to tempPoint over 0 seconds
            Custom script: call RemoveLocation(udg_tempPoint)
          Else - Actions
marineDeath
  Events
    Unit - A unit Dies
  Conditions
    (Unit-type of (Dying unit)) Equal to Marine
  Actions
    Set VariableSet deaths = (deaths + 1)
    Set VariableSet tempInt = ((Player number of (Owner of (Dying unit))) - 1)
    Set VariableSet deadMarines[tempInt] = True
    Item - Remove (Item carried by (Dying unit) of type Ammo)
    Item - Remove (Item carried by (Dying unit) of type Medpack)
    Item - Remove (Item carried by (Dying unit) of type Barricade)
    Item - Remove (Item carried by (Dying unit) of type Stimpack)
    Item - Remove (Item carried by (Dying unit) of type Poison Bombs)
    Countdown Timer - Start deathTimer[tempInt] as a One-shot timer that will expire in (((30.00 + ((Real(deaths)) x 2.00)) + (10.00 x (Real(level)))) + ((Real(difficultyIndex)) x 10.00)) seconds
    Countdown Timer - Create a timer window for (Last started timer) with title Revive Time:
    Countdown Timer - Hide (Last created timer window)
    Countdown Timer - Show (Last created timer window) for (Owner of (Dying unit))
    Set VariableSet timerWindows[tempInt] = (Last created timer window)
    Set VariableSet tempGroup = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Marine) and (((Matching unit) is alive) Equal to True)))
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (Number of units in tempGroup) Equal to 0
      Then - Actions
        For each (Integer A) from 1 to maxPlayers, do (Actions)
          Loop - Actions
            Game - Defeat (Player((Integer A))) with the message: Defeat!
      Else - Actions
    Custom script: call DestroyGroup(udg_tempGroup)