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

Elemental Wave [MUI] v1.7.1

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: call RemoveLocation(udg_TempPoint3)
      • 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
            • Then - Actions
              • Custom script: call DestroyGroup(udg_UndamageGroup[udg_EW_Current_Index])
              • Unit - Remove EW_Dummy[EW_Current_Index] from the game
              • Set EW_Dummy[EW_Current_Index] = EW_Dummy[EW_Max_Index]
              • Set EW_Dummy[EW_Max_Index] = No unit
              • Set EW_Caster[EW_Current_Index] = EW_Caster[EW_Max_Index]
              • Set EW_Caster[EW_Max_Index] = No unit
              • Set EW_Angle[EW_Current_Index] = EW_Angle[EW_Max_Index]
              • Set EW_Angle[EW_Max_Index] = 0.00
              • Set EW_Current_Index = (EW_Current_Index - 1)
              • Set EW_Max_Index = (EW_Max_Index - 1)
            • Else - Actions
          • Custom script: call DestroyGroup(udg_DamageGroup[udg_EW_Current_Index])
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Custom script: call RemoveLocation(udg_TempPoint2)
      • 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 :p

[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:
  1. Fix the unused Variable

    V1.7:
    1. Tree Destruction much smoother than before
    2. Fix the unused Variable
    3. Use stored Variable

    v1.6:
    1. Change Point array to 3 TempPoint variables
    2. The "attack" animation and the 50.00% animation speed is now configurable
    3. Tree Destruction no longer Destroy Bridges
    4. Now Variable using prefix "EW_"
    5. Cached the level of the ability
    6. The Start Range is now configurable
    7. Now using the Ability Variable which stored on map init
    8. Now using EW_Owner to get the triggering player
    9. The UndamageGroup is no longer global to all spells

    <v.15
    I'm forgot xD



  1. Keywords:
    Archmage, Mage, Summon, Water, Elemental, Wave.
Contents

Elemental Wave (Map)

Reviews
14:30 June 30, 2013 Magtheridon96: Approved.
Level 11
Joined
Mar 27, 2011
Messages
293
?

Sounds good. It is made in which programming language? vJass, GUI / Triggers ... show the Triggers of his appeal.

Losam's Resources:

  • [thread=228426]Storm's Call[/thread]
  • [thread=224367]Stun System[/thread]
  • [thread=235663]Counter Helix[/thread]
  • [thread=227374]Combat System[/thread]
 
Level 13
Joined
Jan 30, 2012
Messages
1,298
Updated:
u need to remove points 1 and 2 in the cast trigger. also u dont need the unDamageGroup

u should store picked unit into a variable and use the variable instead.

rule of thumb anything u use twice or more store into a variable for efficiency and speed.

if i remove points 1 and 2 in the cast trigger, how could i detect target point of ability being cast then?
what variable?
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
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
 
Level 13
Joined
Jan 30, 2012
Messages
1,298
deathismyfriend
oh, i see.. i'll fix it

FRENGERS
you're twisted my friend ~.~"

Edited:
deathismyfriend
when i tried it the Damage is looping :'(
remove unDamageGroiup since its not even used for anything
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
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
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)
  • Unit Group - Add (Picked unit) to UndamageGroup
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
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
 
Level 13
Joined
Jan 30, 2012
Messages
1,298
like this?
[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]
 
  • Action Error
    • -------- 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
I think you are using wrong comment on wrong action :p
I think It should be :
  • -------- What you want your Water Elemental do when it's moving? --------
  • Set EW_Animation = attack
  • ------- This will determined how far Water Elemental is summoned --------
  • Set EW_Animation_Speed = 50.00
 
Top