• 🏆 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!

Black Tornado

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Spell casted at:
Point: Send Offensive Tornado dmg and pull enemies.
Friend: Create Defensive Tornado pushing enemies back.
Enemy: Cast "Cylcone" and deal dmg.

Features:
Using SetUnitXY
It doens push "All" Units at once, its adding 1 unit every loop period to knockback, so it doenst take huge perfomance, when alot units a near.
If unit affected by more than 1 Tornado its push speed will be amplified.
If unit affected by "Cylcone" - Tornado blows him strongly.
If Tornado touch water it create special effect.


Thanks to:
Hanky, Vexorian, Almia, Dizzt, Bribe, Dat-C3

Keywords:
Wind, Tornado, Pull, Push, Cylcone
Contents

Еще одна карта (Map)

Reviews
12th Dec 2015 IcemanBo: For long time as NeedsFix. Rejected. 17:54, 1st Apr 2015 IcemanBo: Read my post in thread.

Moderator

M

Moderator

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

17:54, 1st Apr 2015
IcemanBo: Read my post in thread.
 
Cool versatile spell, 4/5 I think suits it. Add some kind of physics for around cliffs and maybe lifting units up into the air with point target. Just a suggestion of course.

Here's your code;


[trigger=]
BlackTornado init
Events
Map initialization
Conditions
Actions
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
-------- All --------
-------- Setup this in your map --------
Set BlackTornado_Dummy_Type = BlackTornado (dummy)
Set BlackTornado_Ability_Cast = Black Tornado
Set BlackTornado_Ability_Cyclone = Cyclone (Item)
Set BlackTornado_Slow_Aura = Slow Aura (Tornado)
-------- - --------
Set BlackTornado_Kill_Effect = Abilities\Weapons\GlaiveMissile\GlaiveMissileTarget.mdl
Set BlackTornado_Cyclone_Buff_1 = Cyclone
Set BlackTornado_Cyclone_Buff_2 = Cyclone (Extra)
-------- |_____________________________________________| --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
-------- Defensive --------
Set BlackTornado_Defnse_Model = Abilities\Spells\Other\Tornado\TornadoElementalSmall.mdl
Set BlackTornado_Radius_Defense = 300.00
Set BlackTornado_Duration = 10.00
Set BlackTornado_Defensive_Push = 8.00
-------- |_____________________________________________| --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
-------- Offensive --------
Set BlackTornado_Offnesive_Model = Abilities\Spells\NightElf\Cyclone\CycloneTarget.mdl
Set BlackTornado_Offensive_Radius = 150.00
Set BlackTornado_Offensive_Speed = 522.00
Set BlackTornado_Offensive_Distnce = 1000.00
Set BlackTornado_Offensive_Pull = 6.00
Set BlackTornado_Offensive_Rotate = 4.00
Set BlackTornado_Offensive_Damage = 50.00
-------- |_____________________________________________| --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
-------- Solo Target Enemy --------
Set BlackTornado_Cyclone_Dmg = 250.00
Set BlackTornado_Cyclone_Effect = Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
-------- |_____________________________________________| --------
-------- --------------------------- --------
-------- |ZZZZZZZZZZZZZ Trigger Loop ZZZZZZZZZZZZZZZZ| --------
Set BlackTornado_LOOP = 0
Set BlackTornado_Loop_Interval = 0.03
Trigger - Add to BlackTornado loop <gen> the event (Time - Every BlackTornado_Loop_Interval seconds of game time)
Trigger - Turn on BlackTornado cast <gen>
-------- |ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ| --------
-------- --------------------------- --------
-------- ------------------------------------Preload----------------------------------------------- --------
Set BlackTornado_Point = (Center of (Playable map area))
Unit - Create 1 BlackTornado_Dummy_Type for Player 1 (Red) at BlackTornado_Point facing 0.00 degrees
Set BlackTornado_This1 = (Last created unit)
Unit - Add BlackTornado_Slow_Aura to BlackTornado_This1
Unit - Add BlackTornado_Ability_Cyclone to BlackTornado_This1
Unit - Add BlackTornado_Ability_Cast to BlackTornado_This1
Unit - Add Crow Form to BlackTornado_This1
Special Effect - Create a special effect attached to the origin of BlackTornado_This1 using BlackTornado_Offnesive_Model
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the origin of BlackTornado_This1 using BlackTornado_Defnse_Model
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the origin of BlackTornado_This1 using BlackTornado_Cyclone_Effect
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect attached to the origin of BlackTornado_This1 using BlackTornado_Kill_Effect
Special Effect - Destroy (Last created special effect)
Unit - Add a 0.01 second Generic expiration timer to BlackTornado_This1
Custom script: call RemoveLocation (udg_BlackTornado_Point)
-------- ------------------------------------------------------------------------------------------------ --------
[/trigger]
[trigger=]
BlackTornado cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to BlackTornado_Ability_Cast
Actions
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
Set BlackTornado_This1 = (Triggering unit)
Set BlackTornado_Target = (Target unit of ability being cast)
-------- |_____________________________________________| --------
-------- --------------------------- --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_Target Not equal to No unit
(BlackTornado_Target belongs to an enemy of (Owner of BlackTornado_This1)) Equal to True
Then - Actions
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
Set BlackTornado_Point = (Position of BlackTornado_Target)
Special Effect - Create a special effect at BlackTornado_Point using BlackTornado_Cyclone_Effect
Special Effect - Destroy (Last created special effect)
Unit - Cause BlackTornado_This1 to damage BlackTornado_Target, dealing BlackTornado_Cyclone_Dmg damage of attack type Spells and damage type Normal
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Life of BlackTornado_Target) Greater than 0.00
Then - Actions
Unit - Create 1 BlackTornado_Dummy_Type for (Owner of BlackTornado_This1) at BlackTornado_Point facing 0.00 degrees
Unit - Move (Last created unit) instantly to BlackTornado_Point
Unit - Add BlackTornado_Ability_Cyclone to (Last created unit)
Unit - Order (Last created unit) to Night Elf Druid Of The Talon - Cyclone BlackTornado_Target
Unit - Add a 0.30 second Generic expiration timer to (Last created unit)
Else - Actions
Special Effect - Create a special effect at BlackTornado_Point using BlackTornado_Kill_Effect
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at BlackTornado_Point using Objects\Spawnmodels\Undead\UndeadLargeDeathExplode\UndeadLargeDeathExplode.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation (udg_BlackTornado_Point)
-------- |_____________________________________________| --------
Else - Actions
-------- |ZZZZZZZZZZZZZZZ Indexing ZZZZZZZZZZZZZZZZ| --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_Index_Size Equal to 0
Then - Actions
Trigger - Turn on BlackTornado loop <gen>
Else - Actions
Set BlackTornado_Index_Size = (BlackTornado_Index_Size + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_Index_Size Greater than BlackTornado_Index_maxSize
Then - Actions
Set BlackTornado_Index[BlackTornado_Index_Size] = BlackTornado_Index_Size
Set BlackTornado_Index_maxSize = BlackTornado_Index_Size
Else - Actions
Set BlackTornado = BlackTornado_Index[BlackTornado_Index_Size]
-------- |ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ| --------
-------- --------------------------- --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_Target Equal to No unit
Then - Actions
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
Set BlackTornado_Point = (Position of BlackTornado_This1)
Set BlackTornado_Defense[BlackTornado] = False
Set BlackTornado_Offensive = True
Set BlackTornado_Duration_ex[BlackTornado] = (BlackTornado_Offensive_Distnce / BlackTornado_Offensive_Speed)
Set BlackTornado_Offensive_Rotatex[BlackTornado] = BlackTornado_Offensive_Rotate
Set BlackTornado_Radius_ex[BlackTornado] = BlackTornado_Offensive_Radius
Set BlackTornado_Speed[BlackTornado] = BlackTornado_Offensive_Pull
Custom script: if udg_BlackTornado_Group_Damaged [udg_BlackTornado] == null then
Custom script: set udg_BlackTornado_Group_Damaged [udg_BlackTornado] = CreateGroup ()
Custom script: endif
-------- |_____________________________________________| --------
Else - Actions
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
Set BlackTornado_Point = (Position of BlackTornado_Target)
Set BlackTornado_Defense[BlackTornado] = True
Set BlackTornado_Offensive = False
Set BlackTornado_Duration_ex[BlackTornado] = BlackTornado_Duration
Set BlackTornado_Radius_ex[BlackTornado] = BlackTornado_Radius_Defense
Set BlackTornado_Speed[BlackTornado] = BlackTornado_Defensive_Push
-------- --------------------------- --------
-------- |_____________________________________________| --------
-------- |_____________________________________________| --------
-------- --------------------------- --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
Set BlackTornado_KnockBack[BlackTornado] = False
Unit - Create 1 BlackTornado_Dummy_Type for (Owner of BlackTornado_This1) at BlackTornado_Point facing 0.00 degrees
Set BlackTornado_Unit[BlackTornado] = (Last created unit)
Unit - Move BlackTornado_Unit[BlackTornado] instantly to BlackTornado_Point
Unit - Set BlackTornado_Unit[BlackTornado] movement speed to BlackTornado_Offensive_Speed
Unit - Add Crow Form to BlackTornado_Unit[BlackTornado]
Unit - Add BlackTornado_Slow_Aura to BlackTornado_Unit[BlackTornado]
If (BlackTornado_Defense[BlackTornado] Equal to True) then do (Unit - Set level of BlackTornado_Slow_Aura for BlackTornado_Unit[BlackTornado] to 2) else do (Do nothing)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_Offensive Equal to True
Then - Actions
Set BlackTornado_Point_3 = (Target point of ability being cast)
Set BlackTornado_Point_2 = (BlackTornado_Point offset by BlackTornado_Offensive_Distnce towards (Angle from BlackTornado_Point to BlackTornado_Point_3) degrees)
Unit - Order BlackTornado_Unit[BlackTornado] to Move To BlackTornado_Point_2
Custom script: call RemoveLocation (udg_BlackTornado_Point_2)
Custom script: call RemoveLocation (udg_BlackTornado_Point_3)
Animation - Change BlackTornado_Unit[BlackTornado]'s size to (70.00%, 70.00%, 70.00%) of its original size
Special Effect - Create a special effect attached to the origin of BlackTornado_Unit[BlackTornado] using BlackTornado_Offnesive_Model
Else - Actions
Animation - Change BlackTornado_Unit[BlackTornado]'s size to (120.00%, 120.00%, 120.00%) of its original size
Special Effect - Create a special effect attached to the origin of BlackTornado_Unit[BlackTornado] using BlackTornado_Defnse_Model
Set BlackTornado_Model[BlackTornado] = (Last created special effect)
-------- |_____________________________________________| --------
-------- --------------------------- --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
Custom script: call RemoveLocation (udg_BlackTornado_Point)
-------- |_____________________________________________| --------
-------- |_____________________________________________| --------
[/trigger]
[trigger=]
BlackTornado loop
Events
Conditions
Actions
Custom script: local integer maxcollision = 196
Custom script: local integer a = 0
Custom script: local integer radius = maxcollision
Custom script: local real x
Custom script: local real y
For each (Integer BlackTornado_LOOP) from 1 to BlackTornado_Index_Size, do (Actions)
Loop - Actions
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
Set BlackTornado = BlackTornado_Index[BlackTornado_LOOP]
-------- |_____________________________________________| --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_KnockBack[BlackTornado] Equal to True
Then - Actions
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
Set BlackTornado_Checker = False
-------- |_____________________________________________| --------
-------- --------------------------- --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_Defense[BlackTornado] Equal to True
Then - Actions
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
Set BlackTornado_KB_Dist_Current[BlackTornado] = (BlackTornado_KB_Dist_Current[BlackTornado] + BlackTornado_KB_Speed[BlackTornado])
Set BlackTornado_Point = (Position of BlackTornado_Unit[BlackTornado])
Set BlackTornado_Point_3 = (BlackTornado_Point offset by BlackTornado_KB_Speed[BlackTornado] towards BlackTornado_KB_Angle[BlackTornado] degrees)
-------- |_____________________________________________| --------
-------- --------------------------- --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
-------- This is based from tier 3 halls,thanks to Vexorian for this code :D --------
Custom script: set x = GetUnitX ( udg_BlackTornado_Unit [udg_BlackTornado] )
Custom script: set y = GetUnitY ( udg_BlackTornado_Unit [udg_BlackTornado])
Custom script: loop
Custom script: if IsUnitInRangeXY ( udg_BlackTornado_Unit [udg_BlackTornado] , x + radius, y, 0) then
Custom script: set a = radius
Custom script: else
Custom script: set maxcollision = radius
Custom script: endif
Custom script: exitwhen maxcollision - a <= 1
Custom script: set radius = (maxcollision + a) / 2
Custom script: endloop
Custom script: set radius = radius - maxcollision + a
Custom script: set udg_BlackTornado_TouchRadius = radius + 50
-------- |_____________________________________________| --------
-------- --------------------------- --------
Set BlackTornado_Offset = (BlackTornado_Point offset by BlackTornado_TouchRadius towards BlackTornado_KB_Angle[BlackTornado] degrees)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(BlackTornado_Unit[BlackTornado] is A ground unit) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain pathing at BlackTornado_Offset of type Walkability is off) Equal to False
Then - Actions
Set BlackTornado_Group_Temp = (Units within BlackTornado_TouchRadius of BlackTornado_Offset matching (((((Matching unit) is A flying unit) Equal to False) and (((Matching unit) is Ethereal) Equal to False)) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) Not equal to
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in BlackTornado_Group_Temp) Equal to 0
Then - Actions
Custom script: set x = GetLocationX ( udg_BlackTornado_Point_3 )
Custom script: set y = GetLocationY ( udg_BlackTornado_Point_3 )
Custom script: call SetUnitX ( udg_BlackTornado_Unit [udg_BlackTornado] , x )
Custom script: call SetUnitY ( udg_BlackTornado_Unit [udg_BlackTornado] , y )
Else - Actions
Custom script: call DestroyGroup ( udg_BlackTornado_Group_Temp )
-------- -------------------------------------------- --------
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain pathing at BlackTornado_Offset of type Flyability is off) Equal to False
Then - Actions
Custom script: set x = GetLocationX ( udg_BlackTornado_Point_3 )
Custom script: set y = GetLocationY ( udg_BlackTornado_Point_3 )
Custom script: call SetUnitX ( udg_BlackTornado_Unit [udg_BlackTornado] , x )
Custom script: call SetUnitY ( udg_BlackTornado_Unit [udg_BlackTornado] , y )
Else - Actions
-------- --------------------------- --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
Custom script: call RemoveLocation (udg_BlackTornado_Point)
Custom script: call RemoveLocation (udg_BlackTornado_Point_3)
Custom script: call RemoveLocation (udg_BlackTornado_Offset)
If (BlackTornado_KB_Dist_Current[BlackTornado] Greater than or equal to BlackTornado_KB_Distance[BlackTornado]) then do (Set BlackTornado_Checker = True) else do (Do nothing)
-------- |_____________________________________________| --------
Else - Actions
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
Set BlackTornado_Point = (Position of BlackTornado_KB_Tornado_Dady[BlackTornado])
Set BlackTornado_Point_2 = (Position of BlackTornado_Unit[BlackTornado])
-------- |_____________________________________________| --------
-------- --------------------------- --------
Set BlackTornado_Distance = (Distance between BlackTornado_Point and BlackTornado_Point_2)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_Distance Less than or equal to BlackTornado_Radius_ex[BlackTornado]
Then - Actions
-------- ------------------------------------------------------------------------------------------- --------
Set BlackTornado_Distance_Amplifie = (1.50 - (BlackTornado_Distance / BlackTornado_Radius_ex[BlackTornado]))
Set BlackTornado_Angle = ((Angle from BlackTornado_Point to BlackTornado_Point_2) - (BlackTornado_Offensive_Rotatex[BlackTornado] x BlackTornado_Distance_Amplifie))
Set BlackTornado_Distance = (BlackTornado_Distance - (BlackTornado_KB_Speed[BlackTornado] x BlackTornado_Distance_Amplifie))
If (BlackTornado_Distance Less than 70.00) then do (Set BlackTornado_Distance = 70.00) else do (Do nothing)
Set BlackTornado_Point_3 = (BlackTornado_Point offset by BlackTornado_Distance towards BlackTornado_Angle degrees)
-------- ------------------------------------------------------------------------------------------- --------
-------- --------------------------- --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
-------- This is based from tier 3 halls,thanks to Vexorian for this code :D --------
Custom script: set x = GetUnitX ( udg_BlackTornado_Unit [udg_BlackTornado] )
Custom script: set y = GetUnitY ( udg_BlackTornado_Unit [udg_BlackTornado])
Custom script: loop
Custom script: if IsUnitInRangeXY ( udg_BlackTornado_Unit [udg_BlackTornado] , x + radius, y, 0) then
Custom script: set a = radius
Custom script: else
Custom script: set maxcollision = radius
Custom script: endif
Custom script: exitwhen maxcollision - a <= 1
Custom script: set radius = (maxcollision + a) / 2
Custom script: endloop
Custom script: set radius = radius - maxcollision + a
Custom script: set udg_BlackTornado_TouchRadius = radius + 50
-------- |_____________________________________________| --------
-------- --------------------------- --------
Set BlackTornado_Angle = (Angle from BlackTornado_Point_2 to BlackTornado_Point_3)
Set BlackTornado_Offset = (BlackTornado_Point_3 offset by BlackTornado_TouchRadius towards BlackTornado_Angle degrees)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(BlackTornado_Unit[BlackTornado] is A ground unit) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain pathing at BlackTornado_Offset of type Walkability is off) Equal to False
Then - Actions
Set BlackTornado_Group_Temp = (Units within BlackTornado_TouchRadius of BlackTornado_Offset matching (((((Matching unit) is A flying unit) Equal to False) and (((Matching unit) is Ethereal) Equal to False)) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) Not equal to
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in BlackTornado_Group_Temp) Equal to 0
Then - Actions
Custom script: set x = GetLocationX ( udg_BlackTornado_Point_3 )
Custom script: set y = GetLocationY ( udg_BlackTornado_Point_3 )
Custom script: call SetUnitX ( udg_BlackTornado_Unit [udg_BlackTornado] , x )
Custom script: call SetUnitY ( udg_BlackTornado_Unit [udg_BlackTornado] , y )
Else - Actions
Custom script: call DestroyGroup ( udg_BlackTornado_Group_Temp )
-------- -------------------------------------------- --------
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain pathing at BlackTornado_Offset of type Flyability is off) Equal to False
Then - Actions
Custom script: set x = GetLocationX ( udg_BlackTornado_Point_3 )
Custom script: set y = GetLocationY ( udg_BlackTornado_Point_3 )
Custom script: call SetUnitX ( udg_BlackTornado_Unit [udg_BlackTornado] , x )
Custom script: call SetUnitY ( udg_BlackTornado_Unit [udg_BlackTornado] , y )
Else - Actions
-------- ------------------------------------------------------------------------------------------- --------
Custom script: call RemoveLocation (udg_BlackTornado_Point_2)
Custom script: call RemoveLocation (udg_BlackTornado_Point_3)
Custom script: call RemoveLocation (udg_BlackTornado_Offset)
-------- ------------------------------------------------------------------------------------------- --------
Else - Actions
-------- ------------------------------------------------------------------------------------------- --------
Set BlackTornado_Checker = True
-------- ------------------------------------------------------------------------------------------- --------
-------- --------------------------- --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
Custom script: call RemoveLocation (udg_BlackTornado_Point)
Custom script: call RemoveLocation (udg_BlackTornado_Point_2)
-------- |_____________________________________________| --------
-------- |_____________________________________________| --------
-------- --------------------------- --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_Checker Equal to True
Then - Actions
-------- --------------------------- --------
Unit Group - Remove BlackTornado_Unit[BlackTornado] from BlackTornado_Group_Knockbacked
Unit - Turn collision for BlackTornado_Unit[BlackTornado] On
-------- --------------------------- --------
-------- |ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ| --------
-------- RecycleIndex --------
Set BlackTornado_Index[BlackTornado_LOOP] = BlackTornado_Index[BlackTornado_Index_Size]
Set BlackTornado_Index[BlackTornado_Index_Size] = BlackTornado
Set BlackTornado_Index_Size = (BlackTornado_Index_Size - 1)
Set BlackTornado_LOOP = (BlackTornado_LOOP - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_Index_Size Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
-------- |ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ| --------
Else - Actions
-------- |_____________________________________________| --------
Else - Actions
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_Duration_ex[BlackTornado] Greater than 0.00
Then - Actions
-------- Actions --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
Set BlackTornado_Duration_ex[BlackTornado] = (BlackTornado_Duration_ex[BlackTornado] - BlackTornado_Loop_Interval)
Set BlackTornado_Point = (Position of BlackTornado_Unit[BlackTornado])
-------- |_____________________________________________| --------
-------- --------------------------- --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
Set BlackTornado_Group_Temp = (Units within BlackTornado_Radius_ex[BlackTornado] of BlackTornado_Point matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of BlackTornado_Unit[Black
Custom script: set bj_wantDestroyGroup = true
Set BlackTornado_This1 = (Random unit from BlackTornado_Group_Temp)
Custom script: call DestroyGroup ( udg_BlackTornado_Group_Temp )
-------- |_____________________________________________| --------
-------- --------------------------- --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(BlackTornado_This1 is in BlackTornado_Group_Knockbacked) Equal to False
BlackTornado_This1 Not equal to No unit
Then - Actions
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
-------- ------------------------------------------------------------------------------------------- --------
Set BlackTornado_Point_2 = (Position of BlackTornado_This1)
Unit Group - Add BlackTornado_This1 to BlackTornado_Group_Knockbacked
Unit - Turn collision for BlackTornado_This1 Off
-------- ------------------------------------------------------------------------------------------- --------
-------- |ZZZZZZZZZZZZZZZ Indexing ZZZZZZZZZZZZZZZZ| --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_Index_Size Equal to 0
Then - Actions
Trigger - Turn on BlackTornado loop <gen>
Else - Actions
Set BlackTornado_Index_Size = (BlackTornado_Index_Size + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_Index_Size Greater than BlackTornado_Index_maxSize
Then - Actions
Set BlackTornado_Index[BlackTornado_Index_Size] = BlackTornado_Index_Size
Set BlackTornado_Index_maxSize = BlackTornado_Index_Size
Else - Actions
Set BlackTornado_2 = BlackTornado_Index[BlackTornado_Index_Size]
-------- |ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ| --------
-------- ------------------------------------------------------------------------------------------- --------
Set BlackTornado_Distance = ((BlackTornado_Radius_ex[BlackTornado] x 1.30) - (Distance between BlackTornado_Point and BlackTornado_Point_2))
-------- ------------------------------------------------------------------------------------------- --------
Set BlackTornado_KnockBack[BlackTornado_2] = True
Set BlackTornado_Unit[BlackTornado_2] = BlackTornado_This1
Set BlackTornado_KB_Dist_Current[BlackTornado_2] = 0.00
Set BlackTornado_KB_Tornado_Dady[BlackTornado_2] = BlackTornado_Unit[BlackTornado]
Set BlackTornado_Speed_Amplified[BlackTornado_2] = False
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_Defense[BlackTornado] Equal to True
Then - Actions
Set BlackTornado_Defense[BlackTornado_2] = True
Set BlackTornado_KB_Angle[BlackTornado_2] = (Angle from BlackTornado_Point to BlackTornado_Point_2)
Set BlackTornado_KB_Distance[BlackTornado_2] = BlackTornado_Distance
Else - Actions
Set BlackTornado_Defense[BlackTornado_2] = False
Set BlackTornado_Angle = ((Angle from BlackTornado_Point to BlackTornado_Point_2) + BlackTornado_Offensive_Rotatex[BlackTornado])
Set BlackTornado_Point_3 = (BlackTornado_Point offset by (Distance between BlackTornado_Point and BlackTornado_Point_2) towards BlackTornado_Angle degrees)
Set BlackTornado_KB_Angle[BlackTornado_2] = (Angle from BlackTornado_Point_2 to BlackTornado_Point_3)
Set BlackTornado_Offensive_Rotatex[BlackTornado_2] = BlackTornado_Offensive_Rotatex[BlackTornado]
Set BlackTornado_Radius_ex[BlackTornado_2] = BlackTornado_Radius_ex[BlackTornado]
Custom script: call RemoveLocation (udg_BlackTornado_Point_3)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((BlackTornado_This1 has buff BlackTornado_Cyclone_Buff_1) Equal to True) or ((BlackTornado_This1 has buff BlackTornado_Cyclone_Buff_2) Equal to True)
Then - Actions
Set BlackTornado_KB_Speed[BlackTornado_2] = (BlackTornado_Speed[BlackTornado] x 3.00)
Else - Actions
Set BlackTornado_KB_Speed[BlackTornado_2] = BlackTornado_Speed[BlackTornado]
-------- ------------------------------------------------------------------------------------------- --------
Custom script: call RemoveLocation (udg_BlackTornado_Point_2)
-------- |_____________________________________________| --------
Set BlackTornado_Checker = True
Else - Actions
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
-------- Amplify speed, if touched by more than 1 tornadoes. --------
For each (Integer A) from 1 to BlackTornado_Index_Size, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_This1 Equal to BlackTornado_Unit[(Integer A)]
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_Unit[BlackTornado] Not equal to BlackTornado_KB_Tornado_Dady[(Integer A)]
BlackTornado_Speed_Amplified[(Integer A)] Equal to False
Then - Actions
Set BlackTornado_Speed_Amplified[(Integer A)] = True
Set BlackTornado_KB_Speed[(Integer A)] = (BlackTornado_KB_Speed[(Integer A)] x 1.30)
Set BlackTornado_Offensive_Rotatex[(Integer A)] = (BlackTornado_Offensive_Rotatex[(Integer A)] x 3.00)
Else - Actions
Else - Actions
-------- |_____________________________________________| --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_Defense[BlackTornado] Equal to False
(BlackTornado_This1 is in BlackTornado_Group_Damaged[BlackTornado]) Equal to False
BlackTornado_This1 Not equal to No unit
Then - Actions
Unit - Cause BlackTornado_Unit[BlackTornado] to damage BlackTornado_This1, dealing BlackTornado_Offensive_Damage damage of attack type Spells and damage type Normal
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Life of BlackTornado_This1) Less than or equal to 0.00
Then - Actions
Special Effect - Create a special effect attached to the origin of BlackTornado_This1 using BlackTornado_Kill_Effect
Special Effect - Destroy (Last created special effect)
Else - Actions
Unit Group - Add BlackTornado_This1 to BlackTornado_Group_Damaged[BlackTornado]
Else - Actions
-------- |_____________________________________________| --------
-------- --------------------------- --------
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
Custom script: call RemoveLocation (udg_BlackTornado_Point)
-------- |_____________________________________________| --------
Else - Actions
-------- |``````````````````````````````````````````````````````````````````````````````````````````| --------
Special Effect - Destroy BlackTornado_Model[BlackTornado]
Unit - Remove BlackTornado_Unit[BlackTornado] from the game
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_Defense[BlackTornado] Equal to False
Then - Actions
Unit Group - Remove all units from BlackTornado_Group_Damaged[BlackTornado]
Custom script: call DestroyGroup ( udg_BlackTornado_Group_Damaged [udg_BlackTornado] )
Custom script: set udg_BlackTornado_Group_Damaged [udg_BlackTornado] = null
Else - Actions
-------- |_____________________________________________| --------
-------- --------------------------- --------
-------- |ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ| --------
-------- RecycleIndex --------
Set BlackTornado_Index[BlackTornado_LOOP] = BlackTornado_Index[BlackTornado_Index_Size]
Set BlackTornado_Index[BlackTornado_Index_Size] = BlackTornado
Set BlackTornado_Index_Size = (BlackTornado_Index_Size - 1)
Set BlackTornado_LOOP = (BlackTornado_LOOP - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackTornado_Index_Size Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
-------- |ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ| --------
-------- |_____________________________________________| --------
-------- |_____________________________________________| --------
[/trigger]


I suggest using a timer for more accurate results as well timers have to be restarted since when they get paused/stopped they get their repeat flag removed.
 
  • Why does config not support multiple levels?
  • Make as much configurable as possible. (damage- attack type, all effects)
  • Responses used more often need to be stored into temp variables.
  • I have not read the code carefully yet, but in such big codes desciptive comments are very useful.
  • Concept looks good.
    • Custom script: local integer maxcollision = 196
    ^Shouldn't this be in config part?
  • Could you copy the trigger code into your spell description? Dat-C3 provided the text for you. :)
 
Top