• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Imploding Vortex v. 1.4

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Summons a vortex which sucks everything in an area of effect into the center, the closer the target is to the center the faster it will be pulled. After 10 seconds all units in the vortex will be blown out, taking damage after how close they were to the center of the vortex.

This spell should be fully mui and leakless - should be, don't take my word for it ;)

This is my first spell on the hive, so I hope you like.


  • Implosion Settings
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Settings (Edit here) --------
      • -------- Special Effects per second per unit when the explosion happens (max 20) --------
      • Set EM_SpecialEffectsPerSecond = 10
      • -------- Special Effect 1 (The one which is inside the emplosion all the time) --------
      • Set EM_Special_Effect[1] = Abilities\Spells\Human\FlameStrike\FlameStrikeTarget.mdl
      • -------- Special Effect 2 (The one which spawns when the emplosion is finished) --------
      • Set EM_Special_Effect[2] = Units\NightElf\Wisp\WispExplode.mdl
      • -------- Special Effect 3 (The one which spawns on units when the emplosion is finished) --------
      • Set EM_Special_Effect[3] = Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • -------- AOE --------
      • Set EM_AOE = 1000.00
      • -------- Speed (I recomend something which is about 1 - 3 times your AOE) --------
      • Set EM_Speed = 2000.00
      • -------- Knockback (I recomend something which is about 5 - 7 times your AOE) --------
      • Set EM_Knockback = 6000.00
      • -------- Damage Multiplier --------
      • Set EM_Damage_Multiplier = 1.00
      • -------- Channel Time in seconds --------
      • Set 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 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 EMA_Integars[EM_Index_Size] = EM_Index_Size
          • Set EM_Index_Max_Size = EM_Index_Size
        • Else - Actions
      • Set EMA_Caster_Unit[EMA_Integars[EM_Index_Size]] = (Triggering unit)
      • Set EMA_Target_Point[EMA_Integars[EM_Index_Size]] = (Target point of ability being cast)
      • Special Effect - Create a special effect at EM_Target_Point using EM_Special_Effect[1]
      • Set EMA_Special_Effect[EMA_Integars[EM_Index_Size]] = (Last created special effect)
      • Set EMA_Counter[EMA_Integars[EM_Index_Size]] = (Integer((EM_ChannelTime x 100.00)))
      • Set EMA_SpecialEffectCounter[EMA_Integars[EM_Index_Size]] = (20 / EM_SpecialEffectsPerSecond)
      • Set EMA_Counter_2[EMA_Integars[EM_Index_Size]] = 10
      • Set 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 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 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
              • Set 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 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 EMA_Temp_Points[1] = (Position of (Picked unit))
                      • Set 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[E
                      • 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 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 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 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 EMA_SpecialEffectCounter[EM_Temp_int] = (20 / EM_SpecialEffectsPerSecond)
                    • Else - Actions
                      • Set 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 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 EMA_Integars[EM_Loop] = EMA_Integars[EM_Index_Size]
              • Set EMA_Integars[EM_Index_Size] = EM_Temp_int
              • Set EM_Index_Size = (EM_Index_Size - 1)
              • Set 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 EMA_Active[EMA_Integars[EM_Loop]] = False
                • Else - Actions
            • Else - Actions
Keywords:
Emplosion, Vortex, Black Hole, Explosion, Kaboom, Tornado, Epic, Sci-Fi
Contents

Imploding Vortex (Map)

Reviews
12th Dec 2015 IcemanBo: For too long time as NeedsFix. Rejected. Add importing instructions into the map. The last custom script in the looping trigger is in a wrong place. The indexing works, but using an array inside an array is not that...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: For too long time as NeedsFix. Rejected.

Maker, 2nd Aug 2011, Imploding Vortex v. 1.4

Add importing instructions into the map.
The last custom script in the looping trigger is in a wrong place.
The indexing works, but using an array inside an array is not that good way.
Maybe even use dynamic indexing. That is not mandatory though.
The ability must not be restricted to only one level.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
The stops casting trigger shouldn't be on all the time.
A period of 0.05 seconds doesn't make the knockback look smooth.
Don't spam 20 effects per second per unit.
EM_Index_Size Equal to 0 should be done after Set EM_Index_Size = (EM_Index_Size - 1), not during every loop.
 
Level 3
Joined
Jul 31, 2011
Messages
39
OK... here's the problem...
1) Spell affects both enemies and allies.
2) Only 1 level, which, if you add levels at object editor, you will eventually have to change the triggers because of the appropriate damage differential between levels...
3) I'm a noob, still learning and I don't know how to do these... this spell has too much variables and triggers itself for a newbie...
 
Level 7
Joined
Dec 19, 2009
Messages
249
please... never post 4 reply in a row.
if you want to change damage between levels, set a real variable = X * Level of Spell (the level will be in integer so you will need to convert it into real)
**X: is some real value like 100. So, level 1 will do 100 damage, level 2, 200 etc...

For only damaging enemies, when you check which unit will be hit, put a boolean that will check if the unit is enemy of your caster. Make it equal to true
 
Level 3
Joined
Jul 31, 2011
Messages
39
please... never post 4 reply in a row.
if you want to change damage between levels, set a real variable = X * Level of Spell (the level will be in integer so you will need to convert it into real)
**X: is some real value like 100. So, level 1 will do 100 damage, level 2, 200 etc...

For only damaging enemies, when you check which unit will be hit, put a boolean that will check if the unit is enemy of your caster. Make it equal to true

I am very sorry man... I'll delete the 1st 3... Thank You for the help...
 
Top