• 🏆 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.
Top