1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  4. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Viewer

Genetic Shield.w3x
Variables
Map Stuffs
Map Init
Refresh
Reset Creeps
Messages
Genetic Shield
GS Preload
GS Start
GS Less Damage
GS PushBack
GS Timer
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
GS_Angle real No
GS_CurrentDamage real No
GS_CurrentRange real No
GS_Damage real No
GS_EventGroup group No
GS_Hashtable hashtable No
GS_Loc location Yes
GS_Timer integer No
GS_TriggerHandle boolean No
GS_Units group No
GS_VictimGroup group Yes
Map Init
  Events
    Map initialization
  Conditions
  Actions
    Visibility - Disable fog of war
    Visibility - Disable black mask
Refresh
  Events
    Player - Player 1 (Red) skips a cinematic sequence
  Conditions
  Actions
    Unit Group - Pick every unit in (Units owned by Player 1 (Red).) and do (Actions)
      Loop - Actions
        Unit - Reset ability cooldowns for (Picked unit).
        Unit - Set life of (Picked unit) to (Max life of (Picked unit))
        Unit - Set mana of (Picked unit) to (Max mana of (Picked unit))
Reset Creeps
  Events
    Player - Player 1 (Red) types a chat message containing -creeps (stringnoformat) as An exact match
  Conditions
  Actions
    Unit - Create 4.Footman for Player 2 (Blue) at (Random point in Creep_Create_1 <gen>) facing (Random angle) degrees
    Unit - Create 3.Footman for Player 2 (Blue) at (Random point in Creep_Create_2 <gen>) facing (Random angle) degrees
Messages
  Events
    Time - Elapsed game time is 1.00 seconds
  Conditions
  Actions
    Game - Display to (All players) for 1000000000.00 seconds the text: Press ESC to reset Hit Points, Mana and Cooldowns.Commands:-creeps - [Reseting the creeps]
GS Preload
  Events
    Map initialization
  Conditions
  Actions
    Hashtable - Create a hashtable
    Set VariableSet GS_Hashtable = (Last created hashtable)
GS Start
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Genetic Shield
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        ((Target unit of ability being cast) is in GS_EventGroup.) Equal to False
      Then - Actions
        Trigger - Add to GS_Less_Damage <gen> the event ((Target unit of ability being cast) Takes damage)
        Unit Group - Add (Target unit of ability being cast) to GS_EventGroup
      Else - Actions
    Hashtable - Save 0.00 as (Key shield_damage.) of (Key (Target unit of ability being cast).) in GS_Hashtable.
    Hashtable - Save 0 as (Key timer.) of (Key (Target unit of ability being cast).) in GS_Hashtable.
    Hashtable - Save Handle Of(Target unit of ability being cast) as (Key hero.) of (Key (Target unit of ability being cast).) in GS_Hashtable.
    Unit Group - Add (Target unit of ability being cast) to GS_Units
    Trigger - Turn on GS_Less_Damage <gen>
    Trigger - Turn on GS_Timer <gen>
GS Less Damage
  Events
  Conditions
    ((Triggering unit) has buff Frost Armor) Equal to True
  Actions
    Set VariableSet GS_CurrentDamage = (Load (Key shield_damage.) of (Key (Triggering unit).) from GS_Hashtable.)
    Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + ((Damage taken) / (Real(2))))
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        GS_CurrentDamage Greater than or equal to 250.00
      Then - Actions
        Special Effect - Create a special effect attached to the overhead (attachpoint) of (Triggering unit) using Abilities\Spells\Undead\ReplenishMana\ReplenishManaCasterOverhead.mdl
        Special Effect - Destroy (Last created special effect)
        Set VariableSet GS_Loc[1] = (Position of (Triggering unit))
        Set VariableSet GS_VictimGroup[1] = (Units within 500.00 of GS_Loc[1] matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit)).) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is A ground unit) Equal to True)))).)
        Unit Group - Pick every unit in GS_VictimGroup[1] and do (Actions)
          Loop - Actions
            Unit - Cause (Picked unit) to damage (Picked unit), dealing GS_CurrentDamage damage of attack type Spells and damage type Normal
            Special Effect - Create a special effect attached to the chest (attachpoint) of (Picked unit) using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
            Special Effect - Destroy (Last created special effect)
            Set VariableSet GS_Loc[2] = (Position of (Picked unit))
            Set VariableSet GS_Angle = (Angle from GS_Loc[1] to GS_Loc[2])
            Hashtable - Save GS_Angle as (Key angle.) of (Key (Picked unit).) in GS_Hashtable.
            Hashtable - Save 0.00 as (Key current_range.) of (Key (Picked unit).) in GS_Hashtable.
            Custom script: call RemoveLocation (udg_GS_Loc[2])
        Unit - Remove Frost Armor buff from (Triggering unit)
        Custom script: call RemoveLocation (udg_GS_Loc[1])
        Unit Group - Remove (Triggering unit) from GS_Units.
        Hashtable - Clear all child hashtables of child (Key (Triggering unit).) in GS_Hashtable.
        Trigger - Turn on GS_PushBack <gen>
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (GS_Units is empty) Equal to True
          Then - Actions
            Trigger - Turn off GS_Timer <gen>
            Trigger - Turn off (This trigger)
          Else - Actions
      Else - Actions
        Set VariableSet GS_CurrentDamage = (GS_CurrentDamage + (Damage taken))
        Hashtable - Save GS_CurrentDamage as (Key shield_damage.) of (Key (Triggering unit).) in GS_Hashtable.
GS PushBack
  Events
    Time - Every 0.02 seconds of game time
  Conditions
  Actions
    Unit Group - Pick every unit in GS_VictimGroup[1] and do (Actions)
      Loop - Actions
        Set VariableSet GS_CurrentRange = (Load (Key current_range.) of (Key (Picked unit).) from GS_Hashtable.)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            GS_CurrentRange Less than 100.00
          Then - Actions
            Set VariableSet GS_Loc[3] = (Position of (Picked unit))
            Set VariableSet GS_Angle = (Load (Key angle.) of (Key (Picked unit).) from GS_Hashtable.)
            Set VariableSet GS_Loc[4] = (GS_Loc[3] offset by 10.00 towards GS_Angle degrees.)
            Unit - Move (Picked unit) instantly to GS_Loc[4]
            Custom script: call RemoveLocation (udg_GS_Loc[3])
            Custom script: call RemoveLocation (udg_GS_Loc[4])
            Set VariableSet GS_CurrentRange = (GS_CurrentRange + 10.00)
            Hashtable - Save GS_CurrentRange as (Key current_range.) of (Key (Picked unit).) in GS_Hashtable.
          Else - Actions
            Unit Group - Remove (Picked unit) from GS_VictimGroup[1].
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                ((Picked unit) is A Hero) Equal to False
                (Percentage life of (Picked unit)) Less than or equal to 15.00
              Then - Actions
                Set VariableSet GS_Loc[5] = (Position of (Picked unit))
                Set VariableSet GS_VictimGroup[2] = (Units within 200.00 of GS_Loc[5] matching ((((Matching unit) belongs to an enemy of (Owner of (Load (Key hero.) of (Key (Picked unit).) in GS_Hashtable.)).) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is A ground unit) Equal to True)))).)
                Set VariableSet GS_Damage = ((Percentage life of (Picked unit)) / (Real(2)))
                Unit Group - Pick every unit in GS_VictimGroup[2] and do (Actions)
                  Loop - Actions
                    Unit - Cause (Picked unit) to damage (Picked unit), dealing GS_Damage damage of attack type Spells and damage type Normal
                    Special Effect - Create a special effect attached to the head (attachpoint) of (Picked unit) using Abilities\Spells\Other\ImmolationRed\ImmolationRedDamage.mdl
                    Special Effect - Destroy (Last created special effect)
                Special Effect - Create a special effect attached to the chest (attachpoint) of (Picked unit) using Abilities\Spells\Other\Doom\DoomDeath.mdl
                Special Effect - Destroy (Last created special effect)
                Unit - Kill (Picked unit)
                Custom script: call RemoveLocation (udg_GS_Loc[5])
                Custom script: call DestroyGroup (udg_GS_VictimGroup[2])
              Else - Actions
            Hashtable - Clear all child hashtables of child (Key (Picked unit).) in GS_Hashtable.
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        (GS_VictimGroup[1] is empty) Equal to True
      Then - Actions
        Hashtable - Clear all child hashtables of child (Key (Target unit of ability being cast).) in GS_Hashtable.
        Custom script: call DestroyGroup (udg_GS_VictimGroup[1])
        Trigger - Turn off (This trigger)
      Else - Actions
GS Timer
  Events
    Time - Every 1.00 seconds of game time
  Conditions
  Actions
    Unit Group - Pick every unit in GS_Units and do (Actions)
      Loop - Actions
        Set VariableSet GS_Timer = (Load (Key timer.) of (Key (Picked unit).) from GS_Hashtable.)
        Set VariableSet GS_CurrentDamage = (Load (Key shield_damage.) of (Key (Picked unit).) from GS_Hashtable.)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            GS_Timer Equal to 14
          Then - Actions
            Special Effect - Create a special effect attached to the overhead (attachpoint) of (Picked unit) using Abilities\Spells\Undead\ReplenishMana\ReplenishManaCasterOverhead.mdl
            Special Effect - Destroy (Last created special effect)
            Set VariableSet GS_Loc[6] = (Position of (Picked unit))
            Set VariableSet GS_VictimGroup[1] = (Units within 500.00 of GS_Loc[6] matching ((((Matching unit) belongs to an enemy of (Owner of (Picked unit)).) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is A ground unit) Equal to True)))).)
            Unit Group - Pick every unit in GS_VictimGroup[1] and do (Actions)
              Loop - Actions
                Unit - Cause (Picked unit) to damage (Picked unit), dealing GS_CurrentDamage damage of attack type Spells and damage type Normal
                Special Effect - Create a special effect attached to the chest (attachpoint) of (Picked unit) using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
                Special Effect - Destroy (Last created special effect)
                Set VariableSet GS_Loc[7] = (Position of (Picked unit))
                Set VariableSet GS_Angle = (Angle from GS_Loc[6] to GS_Loc[7])
                Hashtable - Save GS_Angle as (Key angle.) of (Key (Picked unit).) in GS_Hashtable.
                Hashtable - Save 0.00 as (Key current_range.) of (Key (Picked unit).) in GS_Hashtable.
                Custom script: call RemoveLocation (udg_GS_Loc[7])
            Unit - Remove Frost Armor buff from (Picked unit)
            Custom script: call RemoveLocation (udg_GS_Loc[6])
            Unit Group - Remove (Picked unit) from GS_Units.
            Hashtable - Clear all child hashtables of child (Key (Picked unit).) in GS_Hashtable.
            Trigger - Turn on GS_PushBack <gen>
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                (GS_Units is empty) Equal to True
              Then - Actions
                Trigger - Turn off GS_Less_Damage <gen>
                Trigger - Turn off (This trigger)
              Else - Actions
          Else - Actions
            Set VariableSet GS_Timer = (GS_Timer + 1)
            Hashtable - Save GS_Timer as (Key timer.) of (Key (Picked unit).) in GS_Hashtable.