Toss Loop
-
Toss Loop
-
Events
-
Conditions
-
Actions
-
-------- -------------------------------------- --------
-
-------- checking if the unit lands from being tossed --------
-
-------- -------------------------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TossCounter Greater than 50
-
Then - Actions
-
-------- -------------------------------------- --------
-
-------- pausing timer then adding a collision --------
-
-------- -------------------------------------- --------
-
Countdown Timer - Pause TossTimer
-
Unit - Unpause TossUnit[3]
-
Unit - Turn collision for TossUnit[3] On
-
Animation - Change TossUnit[3] flying height to (Default flying height of TossUnit[3]) at 0.00
-
-------- -------------------------------------- --------
-
-------- we create a special effect when the unit lands off --------
-
-------- -------------------------------------- --------
-
Special Effect - Create a special effect attached to the origin of TossUnit[3] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
-
-------- -------------------------------------- --------
-
-------- then if it lands off, we should damage that unit --------
-
-------- -------------------------------------- --------
-
Unit - Cause TossUnit[1] to damage TossUnit[3], dealing (0.20 x (75.00 x (Real((Level of Toss for TossUnit[1]))))) damage of attack type Spells and damage type Fire
-
-------- -------------------------------------- --------
-
-------- then the AoE damage --------
-
-------- -------------------------------------- --------
-
Set TossGroup = (Units within 300.00 of (Position of TossUnit[3]) matching (((Matching unit) belongs to an enemy of (Owner of TossUnit[1])) Equal to True))
-
Unit Group - Pick every unit in TossGroup and do (Unit - Cause TossUnit[1] to damage (Picked unit), dealing (75.00 x (Real((Level of Toss for TossUnit[1])))) damage of attack type Spells and damage type Fire)
-
-------- -------------------------------------- --------
-
-------- removing possible leaks --------
-
-------- -------------------------------------- --------
-
Custom script: call DestroyGroup (udg_TossGroup)
-
Custom script: call RemoveLocation (udg_TossPosition[1])
-
Custom script: call RemoveLocation (udg_TossPosition[3])
-
Else - Actions
-
-------- -------------------------------------- --------
-
-------- changing tossed unit's flying height --------
-
-------- -------------------------------------- --------
-
Set TossCounter = (TossCounter + 1)
-
Animation - Change TossUnit[3] flying height to (775.00 - ((((Real(TossCounter)) - 25.00) x ((Real(TossCounter)) - 25.00)) - 25.00)) at 0.00
-
Set TossPosition[2] = (Position of TossUnit[2])
-
If ((Distance between TossPosition[1] and TossPosition[2]) Greater than 1000.00) then do (Set TossPosition[3] = TossPosition[3]) else do (Set TossPosition[3] = TossPosition[2])
-
Set TossPosition[4] = (Position of TossUnit[3])
-
Set TossPosition[5] = (TossPosition[4] offset by ((Distance between TossPosition[4] and TossPosition[3]) / (50.00 - (Real(TossCounter)))) towards (Angle from TossPosition[4] to TossPosition[3]) degrees)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Distance between TossPosition[4] and TossPosition[3]) Greater than or equal to ((Distance between TossPosition[4] and TossPosition[3]) / (50.00 - (Real(TossCounter))))
-
Then - Actions
-
Unit - Move TossUnit[3] instantly to TossPosition[5]
-
Else - Actions
-
Unit - Move TossUnit[3] instantly to TossPosition[3]
-
-------- -------------------------------------- --------
-
-------- again, removing possible leaks --------
-
-------- -------------------------------------- --------
-
Custom script: call RemoveLocation (udg_TossPosition[2])
-
Custom script: call RemoveLocation (udg_TossPosition[4])
-
Custom script: call RemoveLocation (udg_TossPosition[5])
Special Thanks to:
IceFrog: for the spell idea.
Keywords:
DotA, IceFrog, kurtgiogi, Toss, DotA Toss, Toss Spell, Tiny, Stone Giant, Stone, Giant, DotA Spell, Throw