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

Maelstrom v3

Maelstrom

Presented By:

58rMe.png
217293-albums5560-picture59101.jpg

Information

skill-3.gif
Ability Type:Active
Targeting Type:Location
Hotkey:Q
Conjures a gigantic tornado that sucks enemy units towards the tornado in a spiral effect.Units affected will take damage.The nearer,the larger the damage is.Also affects buildings(damage not suck).
LevelManacostCooldownCast RangeAoEDurationAllowed TargetsEffects
1Configurable101000500 Radius5 SecondsEnemy Unitsdeals 50 base damage.
2Configurable101000500 Radius6 SecondsEnemy Unitsdeals 100 base damage.
3Configurable101000500 Radius7 SecondsEnemy Unitsdeals 150 base damage.
[r]
[trigger=]Maelstrom Config
Events
Map initialization
Conditions
Actions
Custom script: set udg_M_Hash = InitHashtable()
-------- CONFIGURATION --------
-------- Determines the radius of Tornado(damage & Suck) --------
Set M_Radius = 500.00
-------- Determines the damage. --------
Set M_Damage[1] = 50.00
Set M_Damage[2] = 100.00
Set M_Damage[3] = 150.00
-------- Determines the Denominator X --------
Set M_Denominator = 0.01
-------- Determines Numerator --------
Set M_Numerator = 1.00
-------- Determines Loops(for damage & Speed) --------
Set M_Loops = 0.04
-------- Determines base speed --------
Set M_SpeedBase = 400.00
-------- Determines speed --------
Set M_Speed = (M_SpeedBase x M_Loops)
-------- Determines the additional angle for the spiral effect --------
Set M_AnglePlus = 67.50
-------- Determines The SFX of suck --------
Set M_SuckSFX = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
-------- Determines the duration of the Tornado --------
Set M_Duration[1] = 5.00
Set M_Duration[2] = 6.00
Set M_Duration[3] = 7.00
-------- Determines SFX --------
Set M_TornadoSFX = Abilities\Spells\Other\Tornado\TornadoElemental
[/trigger][trigger=]Maelstrom Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Maelstrom
Actions
-------- Variables --------
Set M_Caster = (Triggering unit)
Set M_TargetLoc = (Target point of ability being cast)
Set M_Levels = (Level of Maelstrom for M_Caster)
-------- Creates Tornado --------
Unit - Create 1 Tornado Dummy for (Owner of M_Caster) at M_TargetLoc facing Default building facing degrees
Set M_Tornado = (Last created unit)
Custom script: set udg_M_THandle = GetHandleId(udg_M_Tornado)
-------- Adding Duration --------
Unit - Add a M_Duration[M_Levels] second Generic expiration timer to M_Tornado
-------- Creating SFX --------
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
Set M_SFXOffset = (M_TargetLoc offset by 250.00 towards ((Real((Integer A))) x 45.00) degrees)
Special Effect - Create a special effect at M_SFXOffset using M_TornadoSFX
-------- Saving SFX --------
Hashtable - Save Handle Of(Last created special effect) as (Integer A) of M_THandle in M_Hash
-------- Cleaning Leak --------
Custom script: call RemoveLocation(udg_M_SFXOffset)
-------- Saving Variable --------
Hashtable - Save M_Levels as 0 of M_THandle in M_Hash
-------- Adding Tornado to TornadoGroup --------
Unit Group - Add M_Tornado to M_TornadoGroup
-------- Cleaning Leak --------
Custom script: call RemoveLocation(udg_M_TargetLoc)
-------- Turning ON --------
Trigger - Turn on Maelstrom Loop <gen>
[/trigger][trigger=]Maelstrom Loop
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in M_TornadoGroup and do (Actions)
Loop - Actions
Set M_Picked = (Picked unit)
Custom script: set udg_M_PickedHandle = GetHandleId(udg_M_Picked)
-------- Loading Levels --------
Set M_Levels = (Load 0 of M_PickedHandle from M_Hash)
-------- Checking --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(M_Picked is alive) Equal to True
Then - Actions
Set M_PickedLoc = (Position of M_Picked)
-------- Starts Sucking --------
Set M_VictimGroup = (Units within M_Radius of M_PickedLoc matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of M_Picked)) Equal to True)))
Unit Group - Pick every unit in M_VictimGroup and do (Actions)
Loop - Actions
-------- Variables --------
Set M_PickedV = (Picked unit)
Set M_PickedVLoc = (Position of M_PickedV)
-------- Determines the Damage --------
Set M_DistanceBase = (Distance between M_PickedLoc and M_PickedVLoc)
Set M_DamageLoop = ((M_Numerator / (M_DistanceBase x M_Denominator)) x M_Damage[M_Levels])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
((Picked unit) is Magic Immune) Not equal to True
((Picked unit) is A structure) Not equal to True
Then - Actions
-------- Sets all Variables for the Suck --------
Set M_Angle = ((Angle from M_PickedVLoc to M_PickedLoc) + M_AnglePlus)
Set M_SuckOffset = (M_PickedVLoc offset by M_Speed towards M_Angle degrees)
-------- Starts Sucking --------
Special Effect - Create a special effect at M_PickedVLoc using M_SuckSFX
Special Effect - Destroy (Last created special effect)
-------- Collision --------
Unit - Turn collision for M_PickedV Off
Unit - Move M_PickedV instantly to M_SuckOffset
-------- Damages unit --------
Unit - Cause M_Picked to damage M_PickedV, dealing (M_DamageLoop x M_Loops) damage of attack type Spells and damage type Magic
Unit - Turn collision for M_PickedV On
-------- Cleaning Leak --------
Custom script: call RemoveLocation(udg_M_PickedVLoc)
Custom script: call RemoveLocation(udg_M_SuckOffset)
Else - Actions
-------- Damages Structures --------
Unit - Cause M_Picked to damage M_PickedV, dealing (M_DamageLoop x M_Loops) damage of attack type Spells and damage type Magic
Custom script: call RemoveLocation(udg_M_PickedVLoc)
-------- Cleaning Leaks --------
Custom script: call RemoveLocation(udg_M_PickedLoc)
Custom script: call DestroyGroup(udg_M_VictimGroup)
Else - Actions
-------- Clean UP --------
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
Special Effect - Destroy (Load (Integer A) of M_PickedHandle in M_Hash)
Hashtable - Clear all child hashtables of child M_PickedHandle in M_Hash
Unit Group - Remove M_Picked from M_TornadoGroup
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(M_TornadoGroup is empty) Equal to True
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
[/trigger]
[r]

Post Suggestions and Comments

[r]

Changelogs

[r]
v1.0Spell Released
v2.0Removed 2 Groups
Removed some useless variables
Combined 2 Groups to one Group
Removed M_TornadoLoc
Added Turn Off/On Actions
v3.0cleaned leak
Added 2 new boolean conditions at the victim group
[r]

Credits to:

[r]

Mr.Reez,For the Idea of the Spell:Burning Tornado although i didnt follow some of his effects.


Keywords:
cyclone,wind,air,suck,hole,tornado,typhoon,storm
Contents

Maelstrom (Map)

Reviews
18:35, 16th Jul 2012 Magtheridon96: Approved. But you forgot to delete this line (Custom script: call RemoveLocation(udg_M_PickedVLoc)) inside the if statement of the loop because it is not needed.

Moderator

M

Moderator

18:35, 16th Jul 2012
Magtheridon96: Approved.

But you forgot to delete this line (Custom script: call RemoveLocation(udg_M_PickedVLoc))
inside the if statement of the loop because it is not needed.
 
Level 8
Joined
Sep 18, 2011
Messages
195
Review

First, please use smaller font, and it doesn't need to be all yellow.
Also add hidden BBCodes to your description better than a huge table.
______________________________________________________________
210564-albums5645-picture58954.png
<Maelstrom Loop> trigger Should be initialy off, enabled due to <Maelstrom Cast> trigger firing, and disabled there too
210564-albums5645-picture58954.png
For more efficiency: Change some actions ... (See Suggestions)
[TD] [TD]
Suggestions
TriggerPositionAction
<Maelstrom Cast> triggerLine 7
  • Set M_TornadoLoc = (Position of M_Tornado)
  • -------- Change ^ this action to v this action --------
  • Set M_TornadoLoc = M_TargetLoc
 
Last edited:
Level 2
Joined
Jun 14, 2012
Messages
18
REALLY APPRECIATED!! :) Thank you :) :)
I'm trying it right now :)

Seriously though credits can only be given you! :)
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
LOL! Radamantus copied his logo idea from KhaosMachine :O even the font is the same... #off-topic

The spell is good, i like it. I am lazy to look at the code, but the overall look is good! Perhaps the tornado should make random moves or something at the cost of reduced AoE.. i don't know, i just suggest.
 
LOL! Radamantus copied his logo idea from KhaosMachine :O even the font is the same... #off-topic

The spell is good, i like it. I am lazy to look at the code, but the overall look is good! Perhaps the tornado should make random moves or something at the cost of reduced AoE.. i don't know, i just suggest.
ahahahah,KhaosMachine made it for me!!!(i requested it!)
About the random move,maybe ill put that cause ive been thinking that every day(putting it or not,putting it or not,etc)DILEMMA
 
You need to use co-ordinates for this, considering that you can suck an infinite number of enemy units at a time, you could easily cause a player to have to alt+F4 there way out of a game because it was sucking too many units. Also: this goes for a lot of your spells:

When you pick units and have a large amount of conditions it's better to pick all nearby units first, set a variable to them, then run the variable through conditions, this way it makes it much easier to read and configure for other people - especially moderators, since they can't see the whole line in the format which you're using.

As a side note, incase you do not know what the co-ordinate functions are they are:

SetUnitX(Unit, Where)
SetUnitY(Unit, Where)

Example:

Set udg_Angle = udg_DesiredAngle * bj_DEGTORAD
SetUnitX(udg_Unit, GetUnitX(udg_Unit) + udg_Speed * Cos(udg_Angle))
SetUnitT(udg_Unit, GetUnitY(udg_Unit) + udg_Speed * Sin(udg_Angle))
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Sorry about those examples,cause i dont understand sin cos and tan (15 yrs old)
Compare Magtheridon96's age, you'll be amazed (he's 16, 1 year older than you) and he understand most of the scripts/calculations/etc.
Age is never the excuse.

Also, you don't need to know what are those Cos and Sin function, just follow the script and you're done.

JASS:
SetUnitX(udg_YourUnit, GetUnitX(udg_YourUnit) + udg_SpeedPerInterval * Cos(udg_MovingAngle * bj_DEGTORAD))
SetUnitY(udg_YourUnit, GetUnitY(udg_YourUnit) + udg_SpeedPerInterval * Sin(udg_MovingAngle * bj_DEGTORAD))

The thing you need to manipulate are;
udg_YourUnit (moving unit)
udg_SpeedPerInterval (this is the distance moved per X interval - depends on your Event)
udg_MovingAngle (this is the angle in which you want the unit to move to)

That's all.
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
Compare Magtheridon96's age, you'll be amazed (he's 16, 1 year older than you) and he understand most of the scripts/calculations/etc.
Age is never the excuse.

I must disagree with this. Depending on your age you may not have learnt trigonometry yet. It can be quite confusing at first and you could confuse yourself if you try learning it by yourself.

If you aren't doing trig yet you just need to understand the basics; such as cos is used to get the x-component of angles and sin for the y-component.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I must disagree with this. Depending on your age you may not have learnt trigonometry yet. It can be quite confusing at first and you could confuse yourself if you try learning it by yourself.

If you aren't doing trig yet you just need to understand the basics; such as cos is used to get the x-component of angles and sin for the y-component.
Please don't take the word "Age is never the excuse" LITERALLY.
You can't even turn on PC if you're 6 months old.

Be logic.

Also, as I said, (in this case), just follow the script, you don't have to think about "what is cos ? is it cost of a candy ? and what is sin ? I do not make any sins :(".
All you have to do is follow (with some value manipulations of course).
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
Please don't take the word "Age is never the excuse" LITERALLY.

Hmmm, which other way is there to take that phrase?

Also, as I said, (in this case), just follow the script, you don't have to think about "what is cos ? is it cost of a candy ? and what is sin ? I do not make any sins :(".
All you have to do is follow (with some value manipulations of course).

I don't know about him, but I like to understand what the code is doing. Perhaps he will be happy with just using the script and not knowing what it does...
 
Level 4
Joined
Mar 21, 2014
Messages
79
nice spell! works fine - I use it as an ulti (for Lady Vashji) but I haven't found yet the right balancing for this spell.
the drag into the maelstrom is extremely strong, because if the damage is high enough this is kind of a one-shot killer.

i try to reduce the drag speed and how often one gets dragged, in order to allow players to have a possibility to leave the maelstrom.
 
Top