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

Nature Walk v1.8

  • Like
Reactions: HandsOfficial
Hello. This is my first MUI spell, i hope you enjoy it.
Caster starts moving fast to targeted point in 500 distance and 100 bonus distance per level, by his way every unit within 300 of him becomes entangled in roots. When caster reaches targeted point he slams the ground stunning units for 3 seconds and dealing 100 damage and 100 bonus damage per level.

  • Nature Walk Settings
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ----------------------------------------------- --------
      • -------- Tree check system by D4RK_G4ND4LF --------
      • -------- ----------------------------------------------- --------
      • Set NW_Point1 = (Point(0.00, 0.00))
      • Unit - Create 1 Peasant for Neutral Passive at NW_Point1 facing Default building facing degrees
      • Unit - Hide (Last created unit)
      • Unit - Make (Last created unit) Invulnerable
      • Set NW_Dummy = (Last created unit)
      • Custom script: call RemoveLocation(udg_NW_Point1)
      • -------- ----------------------------------------------- --------
      • -------- Setting ability --------
      • -------- ----------------------------------------------- --------
      • Set NW_Ability = Natur|c0020c000e|r Walk
      • -------- ----------------------------------------------- --------
      • -------- This is a speed of caster, but it will increase periodically --------
      • -------- ----------------------------------------------- --------
      • Set NW_SpeedBase = 1.00
      • -------- ----------------------------------------------- --------
      • -------- Area of Effect of units that suppose to be entangled --------
      • -------- ----------------------------------------------- --------
      • Set NW_AoE1 = 150.00
      • -------- ----------------------------------------------- --------
      • -------- Area of Effect of units that suppose to be stunned --------
      • -------- ----------------------------------------------- --------
      • Set NW_AoE2 = 300.00
      • -------- ----------------------------------------------- --------
      • -------- Setting dummy abilities --------
      • -------- ----------------------------------------------- --------
      • Set NW_DummyAbility[1] = Entangling Roots (Dummy)
      • Set NW_DummyAbility[2] = Stun (Dummy)
      • -------- ----------------------------------------------- --------
      • -------- Animation time, animation of "attack slam"!!! Every hero has it's own animation time so change this!!! --------
      • -------- ----------------------------------------------- --------
      • Set NW_Time = 1.13
      • -------- ----------------------------------------------- --------
      • -------- Max distance --------
      • -------- ----------------------------------------------- --------
      • Set NW_DistanceMax = 1000.00
  • Nature Walk Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to NW_Ability
    • Actions
      • -------- ----------------------------------------------- --------
      • -------- Indexing --------
      • -------- ----------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • NW_Index Equal to 0
        • Then - Actions
          • Trigger - Turn on Nature Walk Loop <gen>
        • Else - Actions
      • Set NW_Index = (NW_Index + 1)
      • Set NW_Index2 = (NW_Index2 + 1)
      • -------- ----------------------------------------------- --------
      • -------- Setting caster --------
      • -------- ----------------------------------------------- --------
      • Set NW_Caster[NW_Index2] = (Triggering unit)
      • -------- ----------------------------------------------- --------
      • -------- Setting target point to calculate angle --------
      • -------- ----------------------------------------------- --------
      • Set NW_Point1 = (Target point of ability being cast)
      • Set NW_Point2 = (Position of NW_Caster[NW_Index2])
      • -------- ----------------------------------------------- --------
      • -------- Calculating angle --------
      • -------- ----------------------------------------------- --------
      • Set NW_Angle[NW_Index2] = (Angle from NW_Point2 to NW_Point1)
      • -------- ----------------------------------------------- --------
      • -------- Setting distance, if you want the maximum distance to be set where you target the ability set the next variable to true --------
      • -------- ----------------------------------------------- --------
      • Set NW_Check1 = True
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • NW_Check1 Equal to True
        • Then - Actions
          • Set NW_Distance[NW_Index2] = (Distance between NW_Point1 and NW_Point2)
        • Else - Actions
          • Set NW_Distance[NW_Index2] = (500.00 + ((Real((Level of NW_Ability for NW_Caster[NW_Index2]))) x 100.00))
      • -------- ----------------------------------------------- --------
      • -------- When we calculated angle we set the point where caster will stop --------
      • -------- ----------------------------------------------- --------
      • Set NW_EndPoint[NW_Index2] = (NW_Point2 offset by NW_Distance[NW_Index2] towards NW_Angle[NW_Index2] degrees)
      • -------- ----------------------------------------------- --------
      • -------- Change animation and collision --------
      • -------- ----------------------------------------------- --------
      • Animation - Change NW_Caster[NW_Index2]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 25.00% transparency
      • Unit - Turn collision for NW_Caster[NW_Index2] Off
      • Custom script: call RemoveLocation(udg_NW_Point1)
      • Custom script: call RemoveLocation(udg_NW_Point2)
  • Nature Walk Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer NW_Index3) from 1 to NW_Index2, do (Actions)
        • Loop - Actions
          • -------- ----------------------------------------------- --------
          • -------- Play the slam animation, only once! --------
          • -------- Credits for this formula go to defskull --------
          • -------- ----------------------------------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • NW_Check2[NW_Index3] Equal to False
            • Then - Actions
              • Animation - Play NW_Caster[NW_Index2]'s attack slam animation
              • Set NW_DistanceGain[NW_Index3] = (NW_DistanceMax / NW_Distance[NW_Index3])
              • Set NW_Speed2[NW_Index3] = (NW_Distance[NW_Index3] / NW_Time)
              • Set NW_Duration[NW_Index3] = (NW_Speed2[NW_Index3] x 0.03)
              • Set NW_Modifier[NW_Index3] = (100.00 x NW_DistanceGain[NW_Index3])
              • Set NW_SolidModifier[NW_Index3] = (NW_Modifier[NW_Index3] x 0.50)
              • Animation - Change NW_Caster[NW_Index3]'s animation speed to NW_SolidModifier[NW_Index3]% of its original speed
              • Set NW_Check2[NW_Index3] = True
            • Else - Actions
          • -------- ----------------------------------------------- --------
          • -------- Increasing speed --------
          • -------- ----------------------------------------------- --------
          • Set NW_Speed[NW_Index3] = (NW_Speed[NW_Index3] + NW_SpeedBase)
          • -------- ----------------------------------------------- --------
          • -------- Setting next point of moving --------
          • -------- ----------------------------------------------- --------
          • Set NW_Point3 = (Position of NW_Caster[NW_Index3])
          • Set NW_Point2 = (NW_Point3 offset by NW_Speed[NW_Index3] towards NW_Angle[NW_Index3] degrees)
          • -------- ----------------------------------------------- --------
          • -------- Check if the point is within map boundries --------
          • -------- ----------------------------------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Playable map area) contains NW_Point3) Equal to False
            • Then - Actions
              • -------- ----------------------------------------------- --------
              • -------- Removing Leaks, turning trigger off, recycling --------
              • -------- ----------------------------------------------- --------
              • Custom script: call RemoveLocation(udg_NW_Point2)
              • Custom script: call RemoveLocation(udg_NW_Point3)
              • Custom script: call RemoveLocation(udg_NW_EndPoint[udg_NW_Index3])
              • Set NW_Index = (NW_Index - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • NW_Index Equal to 0
                • Then - Actions
                  • Animation - Reset NW_Caster[NW_Index3]'s animation
                  • Animation - Change NW_Caster[NW_Index3]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
                  • Set NW_Real[NW_Index3] = 0.00
                  • Set NW_X[NW_Index3] = 0.00
                  • Set NW_Y[NW_Index3] = 0.00
                  • Set NW_Speed[NW_Index3] = NW_SpeedBase
                  • Set NW_Check2[NW_Index3] = False
                  • Set NW_Index2 = 0
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
              • -------- ----------------------------------------------- --------
              • -------- Moving caster to next point --------
              • -------- ----------------------------------------------- --------
              • Custom script: set udg_NW_X[udg_NW_Index3] = GetUnitX(udg_NW_Caster[udg_NW_Index3]) + udg_NW_Speed[udg_NW_Index3] * Cos(udg_NW_Angle[udg_NW_Index3] * bj_DEGTORAD)
              • Custom script: set udg_NW_Y[udg_NW_Index3] = GetUnitY(udg_NW_Caster[udg_NW_Index3]) + udg_NW_Speed[udg_NW_Index3] * Sin(udg_NW_Angle[udg_NW_Index3] * bj_DEGTORAD)
              • Custom script: call SetUnitX(udg_NW_Caster[udg_NW_Index3], udg_NW_X[udg_NW_Index3])
              • Custom script: call SetUnitY(udg_NW_Caster[udg_NW_Index3], udg_NW_Y[udg_NW_Index3])
              • Unit - Move NW_Caster[NW_Index3] instantly to NW_Point2
              • Special Effect - Create a special effect attached to the origin of NW_Caster[NW_Index3] using Abilities\Weapons\GreenDragonMissile\GreenDragonMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • -------- ----------------------------------------------- --------
              • -------- Here we make hero more invisible and faster --------
              • -------- ----------------------------------------------- --------
              • Animation - Change NW_Caster[NW_Index3]'s vertex coloring to (100.00%, 100.00%, 100.00%) with NW_Speed[NW_Index3]% transparency
              • -------- ----------------------------------------------- --------
              • -------- We chek if the distance expires, we stun the units --------
              • -------- ----------------------------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between NW_Point3 and NW_EndPoint[NW_Index3]) Less than or equal to NW_Speed[NW_Index3]
                • Then - Actions
                  • Animation - Change NW_Caster[NW_Index3]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
                  • Animation - Reset NW_Caster[NW_Index3]'s animation
                  • -------- ----------------------------------------------- --------
                  • -------- Check if unit is not on cliff --------
                  • -------- ----------------------------------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Terrain pathing at NW_Point3 of type Walkability is off) Equal to True
                    • Then - Actions
                      • Custom script: loop
                      • Set NW_Real[NW_Index3] = (NW_Real[NW_Index3] + 10.00)
                      • Set NW_Point1 = (NW_Point3 offset by NW_Real[NW_Index3] towards NW_Angle[NW_Index3] degrees)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Terrain pathing at NW_Point1 of type Walkability is off) Equal to True
                        • Then - Actions
                          • Unit - Move NW_Caster[NW_Index3] instantly to NW_Point1
                        • Else - Actions
                      • Custom script: call RemoveLocation(udg_NW_Point1)
                      • Custom script: exitwhen udg_NW_Real[udg_NW_Index3] > 300
                      • Custom script: endloop
                    • Else - Actions
                  • Unit - Turn collision for NW_Caster[NW_Index3] On
                  • Special Effect - Create a special effect at NW_EndPoint[NW_Index3] using Abilities\Spells\NightElf\Taunt\TauntCaster.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • -------- ----------------------------------------------- --------
                  • -------- Now we stun units --------
                  • -------- ----------------------------------------------- --------
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within NW_AoE2 of NW_EndPoint[NW_Index3] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of NW_Caster[NW_Index3])) Equal to True)))) and do (Actions)
                    • Loop - Actions
                      • Unit - Create 1 Dummy for (Owner of NW_Caster[NW_Index3]) at NW_EndPoint[NW_Index3] facing Default building facing degrees
                      • Unit - Add NW_DummyAbility[2] to (Last created unit)
                      • Unit - Set level of NW_DummyAbility[2] for (Last created unit) to (Level of NW_Ability for NW_Caster[NW_Index3])
                      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                      • Unit - Order (Last created unit) to Neutral - Firebolt (Picked unit)
                  • -------- ----------------------------------------------- --------
                  • -------- Removing Leaks --------
                  • -------- ----------------------------------------------- --------
                  • Custom script: call RemoveLocation(udg_NW_EndPoint[udg_NW_Index3])
                  • Set NW_Index = (NW_Index - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • NW_Index Equal to 0
                    • Then - Actions
                      • Set NW_Real[NW_Index3] = 0.00
                      • Set NW_X[NW_Index3] = 0.00
                      • Set NW_Y[NW_Index3] = 0.00
                      • Set NW_Speed[NW_Index3] = NW_SpeedBase
                      • Set NW_Check2[NW_Index3] = False
                      • Set NW_Index2 = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
              • -------- ----------------------------- --------
              • -------- Destroy Trees --------
              • -------- System by D4RK_G4ND4LF --------
              • -------- ----------------------------- --------
              • Destructible - Pick every destructible within NW_AoE1 of NW_Point2 and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Current life of (Picked destructible)) Greater than 0.00
                    • Then - Actions
                      • Unit - Order NW_Dummy to Harvest (Picked destructible)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Current order of NW_Dummy) Equal to (Order(harvest))
                        • Then - Actions
                          • Destructible - Kill (Picked destructible)
                          • Unit - Order NW_Dummy to Stop
                        • Else - Actions
                          • Unit - Order NW_Dummy to Stop
                    • Else - Actions
              • -------- ----------------------------------------------- --------
              • -------- Creating group in which units will be entangled --------
              • -------- ----------------------------------------------- --------
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within NW_AoE1 of NW_Point2 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of NW_Caster[NW_Index3])) Equal to True)))) and do (Actions)
                • Loop - Actions
                  • Unit - Create 1 Dummy for (Owner of NW_Caster[NW_Index3]) at NW_Point2 facing Default building facing degrees
                  • Unit - Add NW_DummyAbility[1] to (Last created unit)
                  • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                  • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots (Picked unit)
              • -------- ----------------------------------------------- --------
              • -------- Removing Leaks --------
              • -------- ----------------------------------------------- --------
              • Custom script: call RemoveLocation(udg_NW_Point2)
              • Custom script: call RemoveLocation(udg_NW_Point3)
Note

I wasn't keeping a track of changes i made in this spell, since it was my first MUI, so i can't tell you all the changes i've made, but i can write you changes i made in this version (1.6):
-removed arrays from some variables (Points, Angle, AoE, Speed);
-removed the UnitGroup variables and replaced with bj_wantDestroyGroup;
-the destructibles in your way will be killed;
-removed Index4 and the settings that were meant to run once added to new trigger (Nature Walk Settings).
v1.7:
-added option to check whether the unit should go full range or only to targeted point;
-when the spell is about to end and you're on a cliff, you'll be moved away from a cliff;
-now i check if i destroy only trees;
-made some variables into arrays;
-simplified the groups where i pick the units - removed the if/then/else;
v1.8:
-caster won't go out of map boundaries;
-added an animation when unit is moving.
Give credits if you use it in your map.
Credits: Dr. Boom, Adictuz, Maker, Bribe, defskull


Keywords:
Walk, nature, entangle, stomp, run
Contents

Nature Walk (Map)

Reviews
Bribe: These recent changes you've made have really set this in as a strong-quality spell. I like how it works and is now a very efficient GUI spell. Approved.
Level 4
Joined
Jan 9, 2011
Messages
28
problem with modifying spell!

Changing the dummy spell to shadow strike lead to really bad consequences in my map. Because repeated entangles don't stack damage repeated strikes do especially with iinitial damage and decay damage.Q is how many times does the dummy spell get cast every second? :vw_wtf:
 
Level 12
Joined
Apr 16, 2010
Messages
584
Well that depends how much units that suppose to get entangled are... If there are 10 units then each 0.03 seconds dummy will cast an ability on each unit - A LOT! If you want to change the entangle to shadow strike ability, just add another real arrayed variable that will be increased every 0.03 seconds by 03, so when the variable will become greater then 1 - recycle it and then order dummy to cast the shadow strike.
 
Top