Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Spell Description:
Elemental Wave
Archmage summon and send his Water Elemental to move toward his opponent, Damaging land units in its path.
Level 1 - Archmage summon and send his Water Elemental to move toward his opponent, Deals 100 Damage to land units in its path.
Level 2 - Archmage summon and send his Water Elemental to move toward his opponent, Deals 150 Damage to land units in its path.
Level 3 - Archmage summon and send his Water Elemental to move toward his opponent, Deals 200 Damage to land units in its path.
Elemental Wave Init
Events
Map initialization
Conditions
Actions
Set EW_Ability = Elemental Wave
-------- This is for easier to track ability --------
Set EW_AoE[1] = 200.00
Set EW_AoE[2] = 200.00
Set EW_AoE[3] = 200.00
-------- AoE is the same system in normal shockwave you can change it --------
Set Damage[1] = 100.00
Set Damage[2] = 150.00
Set Damage[3] = 200.00
-------- Damage units in the line per level, also you can change it --------
Set EW_StartRange = 150.00
-------- This will determined how far Water Elemental is summoned --------
Set EW_Animation = attack
-------- What you want your Water Elemental do when it's moving? --------
Set EW_Animation_Speed = 50.00
-------- This is the speed when your Water Elemental do it's animation --------
Set EW_BaseRange[1] = 1000.00
Set EW_BaseRange[2] = 1000.00
Set EW_BaseRange[3] = 1000.00
-------- This is the base range, how far you want your Water Elemental Travel? --------
-------- the formula is 1000 / Speed per level x 0.03 x 0.03 --------
Set EW_Speed[1] = 1000.00
Set EW_Speed[2] = 1000.00
Set EW_Speed[3] = 1000.00
-------- This is your water elemental speed during its travel --------
-------- the formula is Speed per level x 0.03 --------
Set EW_SFX[1] = Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
Set EW_SFX[2] = Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
-------- This is Special Effect you use during Travel and which Enemies take damage --------
Set EW_DestroyTree = True
-------- Set this to false if you don't want to destroy tree --------
-------- --------------- --------
-------- for easy to import --------
Set EW_DummyType = Water Elemental
-------- Do not change this! --------
Set TempPoint = (Center of (Playable map area))
Unit - Create 1 Peasant for Neutral Passive at (Center of (Playable map area)) facing Default building facing degrees
Unit - Hide (Last created unit)
Set EW_TreeDestroyer = (Last created unit)
Custom script: call RemoveLocation(udg_TempPoint)
Elemental Wave Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to EW_Ability
Actions
Set EW_Max_Index = (EW_Max_Index + 1)
Set EW_Caster[EW_Max_Index] = (Triggering unit)
Set EW_Owner[EW_Max_Index] = (Triggering player)
Set EW_Level[EW_Max_Index] = (Level of EW_Ability for EW_Caster[EW_Max_Index])
Set TempPoint = (Position of EW_Caster[EW_Max_Index])
Set TempPoint2 = (Target point of ability being cast)
Set EW_Angle[EW_Max_Index] = (Angle from TempPoint to TempPoint2)
Set TempPoint3 = (TempPoint offset by EW_StartRange towards EW_Angle[EW_Max_Index] degrees)
Set EW_Range[EW_Max_Index] = ((EW_BaseRange[EW_Level[EW_Max_Index]] / (EW_Speed[EW_Level[EW_Max_Index]] x 0.03)) x 0.03)
Unit - Create 1 EW_DummyType for EW_Owner[EW_Max_Index] at TempPoint3 facing EW_Angle[EW_Max_Index] degrees
Set EW_Dummy[EW_Max_Index] = (Last created unit)
Unit - Add a EW_Range[EW_Max_Index] second Generic expiration timer to EW_Dummy[EW_Max_Index]
Animation - Change EW_Dummy[EW_Max_Index]'s animation speed to EW_Animation_Speed% of its original speed
Animation - Play EW_Dummy[EW_Max_Index]'s EW_Animation animation
Custom script: set udg_UndamageGroup[udg_EW_Max_Index] = CreateGroup()
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
EW_Max_Index Equal to 1
Then - Actions
Trigger - Turn on Elemental Wave Loop <gen>
Else - Actions
Elemental Wave Loop
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
For each (Integer EW_Current_Index) from 1 to EW_Max_Index, do (Actions)
Loop - Actions
Set TempPoint = (Position of EW_Dummy[EW_Current_Index])
Set TempPoint2 = (TempPoint offset by (EW_Speed[EW_Level[EW_Current_Index]] x 0.03) towards EW_Angle[EW_Current_Index] degrees)
Unit - Move EW_Dummy[EW_Current_Index] instantly to TempPoint2
Special Effect - Create a special effect at TempPoint using EW_SFX[1]
Special Effect - Destroy (Last created special effect)
Set DamageGroup[EW_Current_Index] = (Units within EW_AoE[EW_Level[EW_Current_Index]] of TempPoint matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of EW_Owner[EW_Current_Index]) Equal to True) and ((((Matching unit) is A structure) Not equal to True and ((((Matching unit) is in UndamageGroup[EW_Current_Index]) Not equal to True) and (((Matching unit) is Magic Immune) Equal to False)
Unit Group - Pick every unit in DamageGroup[EW_Current_Index] and do (Actions)
Loop - Actions
Set TempUnit = (Picked unit)
Unit - Cause EW_Caster[EW_Current_Index] to damage TempUnit, dealing Damage[EW_Level[EW_Current_Index]] damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the chest of TempUnit using EW_SFX[2]
Special Effect - Destroy (Last created special effect)
Unit Group - Add TempUnit to UndamageGroup[EW_Current_Index]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
EW_DestroyTree Equal to True
Then - Actions
Destructible - Pick every destructible within EW_AoE[EW_Level[EW_Current_Index]] of TempPoint and do (Actions)
Loop - Actions
Unit - Order EW_TreeDestroyer to Harvest (Picked destructible)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current order of EW_TreeDestroyer) Equal to (Order(harvest))
Then - Actions
Destructible - Kill (Picked destructible)
Else - Actions
Unit - Order EW_TreeDestroyer to Stop
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(EW_Dummy[EW_Current_Index] is dead) Equal to True
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
EW_Max_Index Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
This Spell is actually a sample for Mr_Bean but anyway everyone can use!
Give me Credits if you used it in your map
thanks to DotCa for supporting me
[highlight]How to Import[/code]:
Go to World Editor => file => Preferences => Check the "Automatically create unknown Variable while pasting trigger data" => ok
then open Object Editor, copy the "Dummy" to your map
[highlight]Updated![/code]
v.1.7.1:
Fix the unused Variable
V1.7:
Tree Destruction much smoother than before
Fix the unused Variable
Use stored Variable
v1.6:
Change Point array to 3 TempPoint variables
The "attack" animation and the 50.00% animation speed is now configurable
Tree Destruction no longer Destroy Bridges
Now Variable using prefix "EW_"
Cached the level of the ability
The Start Range is now configurable
Now using the Ability Variable which stored on map init
Now using EW_Owner to get the triggering player
The UndamageGroup is no longer global to all spells
u need to destroy the points at the end of the trigger like u do for point[3]
u store picked unit into a unit variable... if u dont understand look at my tutorial things a guier should know. it shows u how to store the calls into variables for efficiency and speed
oh sorry i forgot to destroy the points.. i'm getting error xD
thanks for your help
oh, i don't quite understand your tutorial.. what should i do with the variables?
sure, Updated
i'm not change the unDamageGroup due to my stupidity to understand your words; store picked unit into a variable and use the variable instead
to store picked unit to a variable u do it like this...
change this
Unit Group - Pick every unit in DamageGroup and do (Actions)
Loop - Actions
Unit - Cause Caster[Current_Index] to damage (Picked unit), dealing Damage[(Level of Ability for Caster[Current_Index])] damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the chest of (Picked unit) using SFX[2]
Special Effect - Destroy (Last created special effect)
Unit Group - Add (Picked unit) to UndamageGroup
to this and remove unDamageGroiup since its not even used for anything
Unit Group - Pick every unit in DamageGroup and do (Actions)
Loop - Actions
Set tempUnit = (picked unit)
Unit - Cause Caster[Current_Index] to damage tempUnit, dealing Damage[(Level of Ability for Caster[Current_Index])] damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the chest of tempUnit using SFX[2]
Special Effect - Destroy (Last created special effect)
that is how u store it and use the variable. just like u do for points and other things.
then remove this line
Unit Group - Remove all units of UndamageGroup from UndamageGroup
you wrong, i forgot to mention this to you:
unDamageGroup is used to Check whether the units is already take the Damage or not.
If Units is already take the Damage it will added to unDamageGroup to prevent the Damage looping
every units in unDamageGroup cannot be damaged.. since it's showed in here
Set DamageGroup = (Units within AoE[(Level of Ability for Caster[Current_Index])] of Point[1] matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Caster[Current_Index])) Equal to True) and (((Matching unit) is A structure) not Equal to True) and (((Matching unit) is in unDamageGroup) Equal to False)
this also to prevent the Damage looping.. that's why i used this method
if u updated the triggers on here then u never stored picked unit like i showed...
see
Unit Group - Pick every unit in DamageGroup and do (Actions)
Loop - Actions
Unit - Cause Caster[Current_Index] to damage (Picked unit), dealing Damage[(Level of Ability for Caster[Current_Index])] damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the chest of (Picked unit) using SFX[2]
Special Effect - Destroy (Last created special effect)
tempUnit should not be part of the spell. change tempUnit[ current index] to tempUnit.
u need to follow the temp variable rule. temp variables are only temporary. urs are not temporary.
u need to change the names of all of ur variables as they can be used in something else and be overwritten. follow the proper naming on the spell submission thread.
also dont de-index tempUnit its a temp variable it doesnt need to be de-indexed at all nor should it be an array
[trigger=Elemental Wave Loop]Elemental Wave Loop
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
For each (Integer Current_Index) from 1 to Max_Index, do (Actions)
Loop - Actions
Set Point[1] = (Position of Dummy[Current_Index])
Set Point[2] = (Point[1] offset by (Speed[Current_Index] x 0.03) towards Angle[Current_Index] degrees)
Unit - Move Dummy[Current_Index] instantly to Point[2]
Special Effect - Create a special effect at Point[1] using SFX[1]
Special Effect - Destroy (Last created special effect)
Set DamageGroup = (Units within AoE[(Level of Ability for Caster[Current_Index])] of Point[1] matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Caster[Current_Index])) Equal to True) and (((Matching unit) is A structur
Unit Group - Pick every unit in DamageGroup and do (Actions)
Loop - Actions
Set TempUnit = (Picked unit)
Unit - Cause Caster[Current_Index] to damage TempUnit, dealing Damage[(Level of Ability for Caster[Current_Index])] damage of attack type Spells and damage type Normal
Special Effect - Create a special effect attached to the chest of TempUnit using SFX[2]
Special Effect - Destroy (Last created special effect)
Unit Group - Add TempUnit to UndamageGroup
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DestroyTree Equal to True
Then - Actions
Destructible - Pick every destructible within AoE[(Level of Ability for Caster[Current_Index])] of Point[1] and do (Actions)
Loop - Actions
Destructible - Kill (Picked destructible)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Dummy[Current_Index] is dead) Equal to True
Then - Actions
Unit Group - Remove all units of UndamageGroup from UndamageGroup
Unit - Remove Dummy[Current_Index] from the game
Set Dummy[Current_Index] = Dummy[Max_Index]
Set Dummy[Max_Index] = No unit
Set Caster[Current_Index] = Caster[Max_Index]
Set Caster[Max_Index] = No unit
Set Angle[Current_Index] = Angle[Max_Index]
Set Angle[Max_Index] = 0.00
Set Current_Index = (Current_Index - 1)
Set Max_Index = (Max_Index - 1)
Else - Actions
Custom script: call DestroyGroup(udg_DamageGroup)
Custom script: call RemoveLocation(udg_Point[1])
Custom script: call RemoveLocation(udg_Point[2])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Max_Index Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
[/trigger]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.