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

Sprint - v.0.01

The hero runs so fast that he bashs away all enemys on his path.

Note: The unit will run faster than 522 ms

Description before was better but it's quite disappointing to write it again and again 'cause of a fucked up server.

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Sprint
  • Actions
    • Set Sprint_Max = (Sprint_Max + 1)
    • -------- Caster --------
    • Set Sprint_Unit[Sprint_Max] = (Triggering unit)
    • -------- Bonus Speed --------
    • -------- If you want to increase it even more you should consider to change the event of the SprintLoop trigger from 0.03 to 0.02 or even 0.01 cause else it will look choppy --------
    • Set Sprint_Data[(Sprint_Max x 10)] = 20.00
    • -------- Current facing angle (don't change this) --------
    • Set Sprint_Data[((Sprint_Max x 10) + 1)] = (Facing of (Triggering unit))
    • -------- Damage --------
    • Set Sprint_Data[((Sprint_Max x 10) + 2)] = (Real((((Level of (Ability being cast) for (Triggering unit)) x 50) + 50)))
    • -------- Bash Distance --------
    • Set Sprint_Data[((Sprint_Max x 10) + 3)] = 300.00
    • -------- Is this unit a caster? (-1 if yes, don't change this) --------
    • Set Sprint_Data[((Sprint_Max x 10) + 4)] = -1.00
    • -------- Bash speed --------
    • Set Sprint_Data[((Sprint_Max x 10) + 5)] = 20.00
    • -------- Don't change this --------
    • Set Sprint_Data[((Sprint_Max x 10) + 6)] = 0.00
    • -------- Don't change this --------
    • Set Sprint_Data[((Sprint_Max x 10) + 7)] = 0.00
    • -------- Start sfx count (don't change this) --------
    • Set Sprint_Data[((Sprint_Max x 10) + 8)] = 0.00
    • -------- Special effects every x executions of the loop trigger --------
    • Set Sprint_Data[((Sprint_Max x 10) + 9)] = 4.00
    • -------- Run the loop trigger (don't change this) --------
    • Trigger - Turn on SprintLoop <gen>
    • -------- You may move this to your ini section as well --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • cane Equal to No item
      • Then - Actions
        • Set loc = (Point(0.00, 0.00))
        • Item - Create Cheese at loc
        • Item - Hide (Last created item)
        • Set cane = (Last created item)
        • Item - Create Cheese at loc
        • Item - Hide (Last created item)
        • Set cane2 = (Last created item)
        • Set pathregion = (Region centered at loc with size (64.00, 64.00))
        • Custom script: call RemoveLocation(udg_loc)
      • Else - Actions
  • Events
    • Time - Every 0.03 seconds of game time
  • Conditions
  • Actions
    • -------- DON'T CHANGE ANYTHING BELOW UNLESS YOU KNOW WHAT YOU ARE DOING! (except the special effect and the angle difference, they are marked with lots of dots) --------
    • For each (Integer i) from 1 to Sprint_Max, do (Actions)
      • Loop - Actions
        • -------- r is used to store the speed --------
        • Set r = -1.00
        • -------- u is used to store the unit cause it is faster and easier to use a non-array variable for things --------
        • Set u = Sprint_Unit[i]
        • -------- Decide if the unit is a caster or a target --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Sprint_Data[((i x 10) + 4)] Equal to -1.00
          • Then - Actions
            • Set a = (Facing of u)
            • -------- If the unit has the sprint buff it will be made faster --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (u has buff Sprint ) Equal to True
              • Then - Actions
                • -------- Check order and angle difference --------
                • -------- If the difference between the last facing angle and the current one is quite small it is save to increase the unit's speed --------
                • -------- Change the value if you think a different one will fit better --------
                • -------- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --------
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Current order of u) Equal to (Order(smart))
                    • (Abs((a - Sprint_Data[((i x 10) + 1)]))) Less than 3.00
                  • Then - Actions
                    • -------- Set r to bash speed --------
                    • Set r = Sprint_Data[(i x 10)]
                    • Set loc = (Position of u)
                    • Custom script: set bj_wantDestroyGroup = true
                    • -------- Smash away all units in range --------
                    • Unit Group - Pick every unit in (Units within 180.00 of loc matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A flying unit) Equal to False) and (((Life of (Matching unit)) Greater than 0.00) and ((((Matching unit) belongs to an enemy of (Owner of u)) Equ and do (Actions)
                      • Loop - Actions
                        • Unit - Cause u to damage (Picked unit), dealing Sprint_Data[((i x 10) + 2)] damage of attack type Spells and damage type Normal
                        • Set loc2 = (Position of (Picked unit))
                        • Set Sprint_Max = (Sprint_Max + 1)
                        • Set Sprint_Unit[Sprint_Max] = (Picked unit)
                        • Set Sprint_Data[((Sprint_Max x 10) + 4)] = (Angle from loc to loc2)
                        • Set Sprint_Data[((Sprint_Max x 10) + 5)] = Sprint_Data[((i x 10) + 5)]
                        • Set Sprint_Data[((Sprint_Max x 10) + 6)] = 0.00
                        • Set Sprint_Data[((Sprint_Max x 10) + 7)] = Sprint_Data[((i x 10) + 3)]
                        • Set Sprint_Data[((Sprint_Max x 10) + 8)] = 0.00
                        • Set Sprint_Data[((Sprint_Max x 10) + 9)] = Sprint_Data[((i x 10) + 9)]
                        • Unit Group - Add (Picked unit) to Sprint_Target_Group
                        • Custom script: call RemoveLocation(udg_loc2)
                    • Custom script: call RemoveLocation(udg_loc)
                  • Else - Actions
                • -------- Save new old facing angle --------
                • Set Sprint_Data[((i x 10) + 1)] = a
              • Else - Actions
                • -------- Shift data --------
                • Set Sprint_Unit[i] = Sprint_Unit[Sprint_Max]
                • For each (Integer i2) from 0 to 9, do (Actions)
                  • Loop - Actions
                    • Set Sprint_Data[((i x 10) + i2)] = Sprint_Data[((Sprint_Max x 10) + i2)]
                • Set Sprint_Max = (Sprint_Max - 1)
                • Set i = (i - 1)
          • Else - Actions
            • -------- Increase bash distance --------
            • Set Sprint_Data[((i x 10) + 6)] = (Sprint_Data[((i x 10) + 6)] + Sprint_Data[((i x 10) + 5)])
            • -------- Check if the bash is not over yet --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Sprint_Data[((i x 10) + 6)] Less than Sprint_Data[((i x 10) + 7)]
              • Then - Actions
                • -------- Set bash angle and speed --------
                • Set a = Sprint_Data[((i x 10) + 4)]
                • Set r = Sprint_Data[((i x 10) + 5)]
              • Else - Actions
                • -------- Shift data --------
                • Unit Group - Remove u from Sprint_Target_Group
                • Set Sprint_Unit[i] = Sprint_Unit[Sprint_Max]
                • For each (Integer i2) from 0 to 9, do (Actions)
                  • Loop - Actions
                    • Set Sprint_Data[((i x 10) + i2)] = Sprint_Data[((Sprint_Max x 10) + i2)]
                • Set Sprint_Max = (Sprint_Max - 1)
                • Set i = (i - 1)
        • -------- If the unit is either a running caster or a bash target move them --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • r Not equal to -1.00
          • Then - Actions
            • -------- Calculate new position based on speed and angle --------
            • Custom script: set udg_x = GetUnitX(udg_u)
            • Custom script: set udg_y = GetUnitY(udg_u)
            • Set x = (x + (r x (Cos(a))))
            • Set y = (y + (r x (Sin(a))))
            • -------- Pathchecking --------
            • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
            • Custom script: call MoveRectTo(udg_pathregion, udg_x, udg_y)
            • Item - Pick every item in pathregion and do (Actions)
              • Loop - Actions
                • Item - Hide (Picked item)
            • Custom script: call SetItemPosition(udg_cane, udg_x, udg_y)
            • Custom script: call SetItemPosition(udg_cane2, udg_x, udg_y)
            • Item - Pick every item in pathregion and do (Actions)
              • Loop - Actions
                • Item - Show (Picked item)
            • Item - Hide cane
            • Item - Hide cane2
            • Custom script: if RectContainsCoords(bj_mapInitialPlayableArea, udg_x, udg_y)and udg_x==GetWidgetX(udg_cane)and udg_y==GetWidgetY(udg_cane)and(udg_x!=GetWidgetX(udg_cane2)or udg_y!=GetWidgetY(udg_cane2))then
            • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
            • -------- Moving unit --------
            • Custom script: call SetUnitX(udg_u, udg_x)
            • Custom script: call SetUnitY(udg_u, udg_y)
            • Custom script: endif
            • -------- Creating special effects --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Sprint_Data[((i x 10) + 8)] Equal to Sprint_Data[((i x 10) + 9)]
              • Then - Actions
                • Set Sprint_Data[((i x 10) + 8)] = 0.00
                • -------- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --------
                • -------- Change path to desired special effect path --------
                • Special Effect - Create a special effect attached to the origin of u using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
                • Special Effect - Destroy (Last created special effect)
              • Else - Actions
                • Set Sprint_Data[((i x 10) + 8)] = (Sprint_Data[((i x 10) + 8)] + 1.00)
          • Else - Actions
    • -------- Turn off if nothing is running --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Sprint_Max Less than 1
      • Then - Actions
        • Trigger - Turn off (This trigger)
      • Else - Actions
Keywords:
assault, sprint, speed, 522, movement, NARUTO AND TITTIES
Contents

Sprint (Map)

Reviews
21:51, 16th Jun 2010 Hanky: Fine enough.
Level 4
Joined
Jan 19, 2010
Messages
73
Nice! Could see some really great uses for this. Cavalry charges, abomination charges, anything hitty charging :p.

One thing you might want to do with the spell: Make it configurable how many units you can hit before you stop(Of course infinate should be an option). Just an idea :O
+rep to you.
 
Level 10
Joined
May 19, 2008
Messages
176
There is a small bug... You can cheat your unit through small passages. For example:

Destroy one barrel. The Knight can't go through because his collision is to big. Than stay before the destroyed barrel, activate the ability and give the order to run staight through it. The knight will go through...

But anyway, its a nice spell.

cedi
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
There is a small bug... You can cheat your unit through small passages. For example:

Destroy one barrel. The Knight can't go through because his collision is to big. Than stay before the destroyed barrel, activate the ability and give the order to run staight through it. The knight will go through...
cedi

yes, you are right
it is cause the item pathing check does only work for small regions
it probably would work with units and stop-command-spamming, too but it would be at least 5 times slower

if anyone knows a workaround I'd be happy if this person shares that knowledge
 
Level 9
Joined
Jun 7, 2007
Messages
195
Nice spell.
I especially like it when you order the unit to go to the other side of the cliff and it speeds up, stops and turns, speeds up, stops and turns and so on.

It's just strange that if you have units in front of you and you activate the spell then you run away from the units it still pushes them back. Could you make it so that it only pushes back those I run into directly.
 
Level 25
Joined
Jun 5, 2008
Messages
2,572
The only thing that bugs me is that you use Unit's facing angle.

Unit's can't face all angles i so we come to a situation where a unit is actually moving 10-15 degrees to it's left or right instead of going straight.

The only thing i can think of it a bit complicated so i won't bother you with it.
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
The only thing that bugs me is that you use Unit's facing angle.

Unit's can't face all angles i so we come to a situation where a unit is actually moving 10-15 degrees to it's left or right instead of going straight.

The only thing i can think of it a bit complicated so i won't bother you with it.

I'm not sure if I got you right
I ordered a unit to face 133.71 degrees and after a few milliseconds its facing was exactly 133.71 degrees
feel free to bother me with your idea
eventually I'll understand it then
 
Top