1. Are you planning to upload your awesome spell or system 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 haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  5. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  6. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    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

Imploding Vortex.w3x
Variables
Emploding Vortex
- The Settings -
Implosion Settings
- The System -
Implosion Cast
Implosion Effect
Implosion Stop
This Map
Init
Respawn
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
EM_AOE real No
EM_Caster_Unit unit No
EM_Casters group No
EM_ChannelTime real No
EM_Check_on integer No
EM_Damage_Multiplier real No
EM_Hashtable hashtable No
EM_Index_Max_Size integer No
EM_Index_Size integer No
EM_Knockback real No
EM_Loop integer No
EM_Special_Effect string Yes
EM_SpecialEffectsPerSecond integer No
EM_Speed real No
EM_Target_Point location No
EM_Temp_int integer No
EM_Temp_Unit_Group group No
EMA_Active boolean Yes
EMA_Caster_Unit unit Yes
EMA_Counter integer Yes
EMA_Counter_2 integer Yes
EMA_ExplosionTargets group Yes
EMA_Integars integer Yes
EMA_Special_Effect effect Yes
EMA_SpecialEffectCounter integer Yes
EMA_Target_Point location Yes
EMA_Targets group Yes
EMA_Temp_Points location Yes
Implosion Settings
  Events
    Map initialization
  Conditions
  Actions
    -------- Settings (Edit here) --------
    -------- Special Effects per second per unit when the explosion happens (max 20) --------
    Set VariableSet EM_SpecialEffectsPerSecond = 10
    -------- Special Effect 1 (The one which is inside the emplosion all the time) --------
    Set VariableSet EM_Special_Effect[1] = Abilities\Spells\Human\FlameStrike\FlameStrikeTarget.mdl
    -------- Special Effect 2 (The one which spawns when the emplosion is finished) --------
    Set VariableSet EM_Special_Effect[2] = Units\NightElf\Wisp\WispExplode.mdl
    -------- Special Effect 3 (The one which spawns on units when the emplosion is finished) --------
    Set VariableSet EM_Special_Effect[3] = Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
    -------- AOE --------
    Set VariableSet EM_AOE = 1000.00
    -------- Speed (I recomend something which is about 1 - 3 times your AOE) --------
    Set VariableSet EM_Speed = 2000.00
    -------- Knockback (I recomend something which is about 5 - 7 times your AOE) --------
    Set VariableSet EM_Knockback = 6000.00
    -------- Damage Multiplier --------
    Set VariableSet EM_Damage_Multiplier = 1.00
    -------- Channel Time in seconds --------
    Set VariableSet EM_ChannelTime = 10.00
Implosion Cast
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Imploding Vortex
  Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        EM_Index_Size Equal to 0
      Then - Actions
        Trigger - Turn on Implosion_Effect <gen>
        Trigger - Turn on Implosion_Stop <gen>
      Else - Actions
    Set VariableSet EM_Index_Size = (EM_Index_Size + 1)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      If - Conditions
        EM_Index_Size Greater than EM_Index_Max_Size
      Then - Actions
        Set VariableSet EMA_Integars[EM_Index_Size] = EM_Index_Size
        Set VariableSet EM_Index_Max_Size = EM_Index_Size
      Else - Actions
    Set VariableSet EMA_Caster_Unit[EMA_Integars[EM_Index_Size]] = (Triggering unit)
    Set VariableSet EMA_Target_Point[EMA_Integars[EM_Index_Size]] = (Target point of ability being cast)
    Special Effect - Create a special effect at EMA_Target_Point[EMA_Integars[EM_Index_Size]] using EM_Special_Effect[1]
    Set VariableSet EMA_Special_Effect[EMA_Integars[EM_Index_Size]] = (Last created special effect)
    Set VariableSet EMA_Counter[EMA_Integars[EM_Index_Size]] = (Integer((EM_ChannelTime x 100.00)))
    Set VariableSet EMA_SpecialEffectCounter[EMA_Integars[EM_Index_Size]] = (20 / EM_SpecialEffectsPerSecond)
    Set VariableSet EMA_Counter_2[EMA_Integars[EM_Index_Size]] = 10
    Set VariableSet EMA_Active[EMA_Integars[EM_Index_Size]] = True
Implosion Effect
  Events
    Time - Every 0.03 seconds of game time
  Conditions
  Actions
    For each (Integer EM_Loop) from 1 to EM_Index_Size, do (Actions)
      Loop - Actions
        Set VariableSet EM_Temp_int = EMA_Integars[EM_Loop]
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            EMA_Active[EM_Temp_int] Equal to True
          Then - Actions
            Set VariableSet EM_Temp_Unit_Group = (Units within EM_AOE of EMA_Target_Point[EM_Temp_int] matching (((Matching unit) Not equal to EMA_Caster_Unit[EM_Temp_int]) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)))).)
            Set VariableSet EMA_Counter[EM_Temp_int] = (EMA_Counter[EM_Temp_int] - 3)
            Unit Group - Pick every unit in EMA_Targets[EM_Temp_int] and do (Actions)
              Loop - Actions
                Set VariableSet EMA_Temp_Points[1] = (Position of (Picked unit))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    (Distance between EMA_Target_Point[EM_Temp_int] and EMA_Temp_Points[3]) Greater than EM_AOE
                  Then - Actions
                    Unit - Turn collision for (Picked unit) On.
                    Unit Group - Remove (Picked unit) from EMA_Targets[EM_Temp_int].
                  Else - Actions
                Custom script: call RemoveLocation (udg_EMA_Temp_Points[1])
            Unit Group - Pick every unit in EM_Temp_Unit_Group and do (Actions)
              Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    EMA_Counter[EM_Temp_int] Greater than 0
                  Then - Actions
                    Set VariableSet EMA_Temp_Points[1] = (Position of (Picked unit))
                    Set VariableSet EMA_Temp_Points[2] = (EMA_Temp_Points[1] offset by (EM_Speed / ((Distance between EMA_Temp_Points[1] and EMA_Target_Point[EM_Temp_int]) + 10.00)) towards ((Angle from EMA_Temp_Points[1] to EMA_Target_Point[EM_Temp_int]) + (Max(0.00, (90.00 - (((Distance between EMA_Target_Point[EM_Temp_int] and EMA_Temp_Points[1]) + 250.00) / 15.00))))) degrees.)
                    Unit - Turn collision for (Picked unit) Off.
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        ((Playable map area) contains EMA_Temp_Points[2]) Equal to True
                      Then - Actions
                        Custom script: call SetUnitX(GetEnumUnit(),GetLocationX(udg_EMA_Temp_Points[2]))
                        Custom script: call SetUnitY(GetEnumUnit(),GetLocationY(udg_EMA_Temp_Points[2]))
                      Else - Actions
                    Unit Group - Add (Picked unit) to EMA_Targets[EM_Temp_int]
                    Custom script: call RemoveLocation (udg_EMA_Temp_Points[1])
                    Custom script: call RemoveLocation (udg_EMA_Temp_Points[2])
                  Else - Actions
                    Unit Group - Add (Picked unit) to EMA_ExplosionTargets[EM_Temp_int]
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                EMA_Counter[EM_Temp_int] Less than or equal to 0
                EMA_Counter_2[EM_Temp_int] Greater than 0
              Then - Actions
                Set VariableSet EMA_Counter_2[EM_Temp_int] = (EMA_Counter_2[EM_Temp_int] - 1)
                Special Effect - Create a special effect at EMA_Target_Point[EM_Temp_int] using EM_Special_Effect[2]
                Special Effect - Destroy (Last created special effect)
                Unit Group - Pick every unit in EMA_ExplosionTargets[EM_Temp_int] and do (Actions)
                  Loop - Actions
                    Set VariableSet EMA_Temp_Points[1] = (Position of (Picked unit))
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        EMA_Counter_2[EM_Temp_int] Greater than or equal to 9
                      Then - Actions
                        Unit - Cause EMA_Caster_Unit[EM_Temp_int] to damage (Picked unit), dealing ((600.00 - ((Distance between EMA_Temp_Points[1] and EMA_Target_Point[EM_Temp_int]) x 0.60)) x EM_Damage_Multiplier) damage of attack type Spells and damage type Universal
                      Else - Actions
                    Set VariableSet EMA_Temp_Points[2] = (EMA_Temp_Points[1] offset by (EM_Knockback / (((Distance between EMA_Temp_Points[1] and EMA_Target_Point[EM_Temp_int]) / 10.00) + 50.00)) towards (Angle from EMA_Target_Point[EM_Temp_int] to EMA_Temp_Points[1]) degrees.)
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        ((Playable map area) contains EMA_Temp_Points[2]) Equal to True
                      Then - Actions
                        Unit - Move (Picked unit) instantly to EMA_Temp_Points[2]
                      Else - Actions
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      If - Conditions
                        EMA_SpecialEffectCounter[EM_Temp_int] Equal to 0
                      Then - Actions
                        Special Effect - Create a special effect at EMA_Temp_Points[2] using EM_Special_Effect[3]
                        Special Effect - Destroy (Last created special effect)
                      Else - Actions
                    Custom script: call RemoveLocation (udg_EMA_Temp_Points[1])
                    Custom script: call RemoveLocation (udg_EMA_Temp_Points[2])
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  If - Conditions
                    EMA_SpecialEffectCounter[EM_Temp_int] Equal to 0
                  Then - Actions
                    Set VariableSet EMA_SpecialEffectCounter[EM_Temp_int] = (20 / EM_SpecialEffectsPerSecond)
                  Else - Actions
                    Set VariableSet EMA_SpecialEffectCounter[EM_Temp_int] = (EMA_SpecialEffectCounter[EM_Temp_int] - 1)
              Else - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                EMA_Counter_2[EM_Temp_int] Less than or equal to 0
              Then - Actions
                Set VariableSet EMA_Active[EM_Temp_int] = False
              Else - Actions
          Else - Actions
            Unit Group - Pick every unit in EMA_Targets[EM_Temp_int] and do (Actions)
              Loop - Actions
                Unit - Turn collision for (Picked unit) On.
            Special Effect - Destroy EMA_Special_Effect[EM_Temp_int]
            Unit Group - Remove all units from EMA_Targets[EM_Temp_int].
            Unit Group - Remove all units from EMA_ExplosionTargets[EM_Temp_int].
            Set VariableSet EMA_Integars[EM_Loop] = EMA_Integars[EM_Index_Size]
            Set VariableSet EMA_Integars[EM_Index_Size] = EM_Temp_int
            Set VariableSet EM_Index_Size = (EM_Index_Size - 1)
            Set VariableSet EM_Loop = (EM_Loop - 1)
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                EM_Index_Size Equal to 0
              Then - Actions
                Trigger - Turn off (This trigger)
                Trigger - Turn off Implosion_Stop <gen>
              Else - Actions
        Custom script: call DestroyGroup (udg_EM_Temp_Unit_Group)
Implosion Stop
  Events
    Unit - A unit Stops casting an ability
  Conditions
    (Ability being cast) Equal to Imploding Vortex
  Actions
    For each (Integer EM_Loop) from 1 to EM_Index_Size, do (Actions)
      Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          If - Conditions
            (Triggering unit) Equal to EMA_Caster_Unit[EMA_Integars[EM_Loop]]
          Then - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              If - Conditions
                EMA_Counter[EMA_Integars[EM_Loop]] Greater than 0
              Then - Actions
                Set VariableSet EMA_Active[EMA_Integars[EM_Loop]] = False
              Else - Actions
          Else - Actions
Init
  Events
    Map initialization
  Conditions
  Actions
    Visibility - Disable fog of war
    Visibility - Disable black mask
Respawn
  Events
    Unit - A unit Dies
  Conditions
  Actions
    Wait 15.00 seconds
    Unit - Create 1.(Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees