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

Fearless Charge v1.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Fearless Charge
by KhaosMachine

I made this spell for HammerFist132, he request it from THIS THREAD.This is easily to configure, you have only to read the import and configure instructions into the map.




  • Fearless Charge v1.0
    —First release


gUTcz.png


Made by
zH8Wj.png



IF ANYONE CAN POST THE TRIGGERS FOR ME, THANKS!!! (I can't because I have the software in spanish language)

Keywords:
fearless charge, fearless, charge, use, spell, item, system, nice system, best system, knockback, lagless, leakless, how to import, nice, sword, hamme
Contents

Fearless Charge (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 09:05, 18th Jul 2012 Magtheridon96: Set TempLoc = .... Set TempLoc = .... Whenever you do something like this, you're leaking a location. The solution is to use TWO locations...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

09:05, 18th Jul 2012
Magtheridon96:

    • Set TempLoc = ....
    • Set TempLoc = ....
    Whenever you do something like this, you're leaking a location.
    The solution is to use TWO locations. TempLoc and TempLoc2.
    You're doing this quite a lot in this script, so there are many leaks.
  • Instead of using your own knockback script, I would highly recommend using Bribe's Knockback 2D system.
  • You should never destroy a trigger like that. You could cause handle stack corruption errors.
  • In the first periodic trigger, the group leaks. Insert "set
    bj_wantDestroyGroup = true" in custom script right above it, or store
    the group in a variable, use it, then destroy it.
  • Your current method of indexing is pretty outdated. I would suggest using something like this.
  • Don't create a footman for player 1 in the beginning to preload the spell, create a locust unit for neutral hostile.
 
Level 22
Joined
Feb 3, 2009
Messages
3,292
Here's the triggers:


  • FC00
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- CONFIGURATION --------
      • -------- CONFIGURATION --------
      • -------- CONFIGURATION --------
      • -------- Fearless Charge ability --------
      • Set FC_Ability = Fearless Charge
      • -------- Walk animation index --------
      • Set FC_Integer_AnimationIndex = 12
      • -------- Special effect that appears when the hero moves --------
      • Set FC_String_SEffectMove = Abilities\Weapons\RedDragonBreath\RedDragonMissile.mdl
      • -------- Special effect that appears when the enemy units are hitted --------
      • Set FC_String_SEffectHit = Abilities\Weapons\RedDragonBreath\RedDragonMissile.mdl
      • -------- Special effect that appears when enemy units are knockbacked --------
      • Set FC_String_SEffectKnockback = Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • -------- Movement speed of the caster --------
          • Set FC_Real_SpeedMove[(Integer A)] = 1000.00
          • -------- Animation speed of the walk/run --------
          • Set FC_Real_AnimationSpeed[(Integer A)] = (FC_Real_SpeedMove[(Integer A)] / 3.00)
          • -------- Percentaje of strenght that damages the enemy units --------
          • Set FC_Real_PercentageStrenght[(Integer A)] = (80.00 + (40.00 x (Real((Integer A)))))
          • -------- Percentage of hit points recovered --------
          • Set FC_Real_PercentageHitPoints[(Integer A)] = (5.00 + (5.00 x (Real((Integer A)))))
          • -------- Area of effect that detect the enemy units --------
          • Set FC_Real_Radius[(Integer A)] = 150.00
          • -------- Chance to cancel the ability --------
          • Set FC_Real_PercentageCancel[(Integer A)] = 10.00
          • -------- Distance of the knockback --------
          • Set FC_Real_DistanceKnockback[(Integer A)] = 150.00
          • -------- Speed of the knockback --------
          • Set FC_Real_SpeedKnockback[(Integer A)] = 400.00
      • -------- END CONFIGURATION --------
      • -------- END CONFIGURATION --------
      • -------- END CONFIGURATION --------
      • -------- PRELOAD / REMOVE LEAKS --------
      • Unit - Create 1 Footman for Player 1 (Red) at TempPoint facing 0.00 degrees
      • Set TempUnit = (Last created unit)
      • Unit - Add FC_Ability to TempUnit
      • Unit - Remove TempUnit from the game
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
      • Game - Preload FC_String_SEffectHit
      • Game - Preload FC_String_SEffectKnockback
      • Game - Preload FC_String_SEffectMove
      • -------- PRELOAD / REMOVE LEAKS --------
  • FC01
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to FC_Ability
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FC_Integer_Index[0] Equal to 0
        • Then - Actions
          • Trigger - Turn on FC02 <gen>
        • Else - Actions
      • Set FC_Integer_Index[0] = (FC_Integer_Index[0] + 1)
      • Set FC_Integer_Index[1] = (FC_Integer_Index[1] + 1)
      • Set FC_Unit_00[FC_Integer_Index[1]] = (Triggering unit)
      • Set TempPoint = (Position of FC_Unit_00[FC_Integer_Index[1]])
      • Set TempPoint2 = (Target point of ability being cast)
      • Set FC_Real_00[FC_Integer_Index[1]] = (Distance between TempPoint and TempPoint2)
      • Set FC_Real_01[FC_Integer_Index[1]] = (Angle from TempPoint to TempPoint2)
      • Set FC_Integer_00[FC_Integer_Index[1]] = (Level of FC_Ability for FC_Unit_00[FC_Integer_Index[1]])
      • Set FC_Real_02[FC_Integer_Index[1]] = 0.10
      • Unit - Pause FC_Unit_00[FC_Integer_Index[1]]
      • Unit - Turn collision for FC_Unit_00[FC_Integer_Index[1]] Off
      • Animation - Change FC_Unit_00[FC_Integer_Index[1]]'s animation speed to FC_Real_AnimationSpeed[FC_Integer_00[FC_Integer_Index[1]]]% of its original speed
      • Custom script: call SetUnitAnimationByIndex(udg_FC_Unit_00[udg_FC_Integer_Index[1]], udg_FC_Integer_AnimationIndex)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Set FC_Boolean[FC_Integer_Index[1]] = True
  • FC02
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer FC_Integer_Index[2]) from 1 to FC_Integer_Index[1], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FC_Boolean[FC_Integer_Index[2]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • FC_Real_00[FC_Integer_Index[2]] Greater than 0.00
                • Then - Actions
                  • Set TempReal = (FC_Real_SpeedMove[FC_Integer_00[FC_Integer_Index[2]]] x 0.03)
                  • Set TempPoint = (Position of FC_Unit_00[FC_Integer_Index[2]])
                  • Set TempPoint = (TempPoint offset by TempReal towards FC_Real_01[FC_Integer_Index[2]] degrees)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • FC_Real_02[FC_Integer_Index[2]] Greater than 0.00
                    • Then - Actions
                      • Set FC_Real_02[FC_Integer_Index[2]] = (FC_Real_02[FC_Integer_Index[2]] - 0.03)
                    • Else - Actions
                      • Special Effect - Create a special effect at TempPoint using FC_String_SEffectMove
                      • Special Effect - Destroy (Last created special effect)
                      • Set FC_Real_02[FC_Integer_Index[2]] = 0.10
                  • Custom script: call SetUnitX(udg_FC_Unit_00[udg_FC_Integer_Index[2]], GetLocationX(udg_TempPoint))
                  • Custom script: call SetUnitY(udg_FC_Unit_00[udg_FC_Integer_Index[2]], GetLocationY(udg_TempPoint))
                  • Unit Group - Pick every unit in (Units within FC_Real_Radius[FC_Integer_00[FC_Integer_Index[2]]] of TempPoint matching (((((Matching unit) is A structure) Not equal to True) and (((Matching unit) is Magic Immune) Not equal to True)) and ((((Matching unit) is alive) Equal to True) and (((Mat and do (Actions)
                    • Loop - Actions
                      • Set TempUnit = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (TempUnit is in FC_UnitGroup_Damaged[FC_Integer_Index[2]]) Not equal to True
                        • Then - Actions
                          • Set TempPoint = (Position of TempUnit)
                          • Set TempPoint2 = (TempPoint offset by 100.00 towards 90.00 degrees)
                          • Special Effect - Create a special effect at TempPoint using FC_String_SEffectHit
                          • Special Effect - Destroy (Last created special effect)
                          • Set TempReal = ((Real((Strength of FC_Unit_00[FC_Integer_Index[2]] (Include bonuses)))) x (FC_Real_PercentageStrenght[FC_Integer_00[FC_Integer_Index[2]]] / 100.00))
                          • Floating Text - Create floating text that reads ((String((Integer(TempReal)))) + !) at TempPoint2 with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
                          • Floating Text - Change (Last created floating text): Disable permanence
                          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                          • Floating Text - Change the fading age of (Last created floating text) to 1.75 seconds
                          • Floating Text - Change the lifespan of (Last created floating text) to 2.30 seconds
                          • Unit - Cause FC_Unit_00[FC_Integer_Index[2]] to damage TempUnit, dealing TempReal damage of attack type Spells and damage type Normal
                          • Unit Group - Add TempUnit to FC_UnitGroup_Damaged[FC_Integer_Index[2]]
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Random percentage) Less than or equal to FC_Real_PercentageCancel[FC_Integer_00[FC_Integer_Index[2]]]
                            • Then - Actions
                              • Set FC_Real_00[FC_Integer_Index[2]] = 0.00
                              • Set TempBoolean = True
                            • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • FC_Integer_IndexKnockback[0] Equal to 0
                            • Then - Actions
                              • Trigger - Turn on FC03 <gen>
                            • Else - Actions
                          • Set FC_Integer_IndexKnockback[0] = (FC_Integer_IndexKnockback[0] + 1)
                          • Set FC_Integer_IndexKnockback[1] = (FC_Integer_IndexKnockback[1] + 1)
                          • Set FC_Unit_01[FC_Integer_IndexKnockback[1]] = TempUnit
                          • Set FC_Real_03[FC_Integer_IndexKnockback[1]] = FC_Real_DistanceKnockback[FC_Integer_00[FC_Integer_Index[2]]]
                          • Set TempPoint2 = (Position of FC_Unit_00[FC_Integer_Index[2]])
                          • Set FC_Real_04[FC_Integer_IndexKnockback[1]] = (Angle from TempPoint2 to TempPoint)
                          • Set FC_Real_05[FC_Integer_IndexKnockback[1]] = (FC_Real_SpeedKnockback[FC_Integer_00[FC_Integer_Index[2]]] x 0.03)
                          • Set FC_Boolean_Knockback[FC_Integer_IndexKnockback[2]] = True
                          • Unit - Turn collision for TempUnit Off
                          • Custom script: call RemoveLocation(udg_TempPoint2)
                        • Else - Actions
                  • Set FC_Real_00[FC_Integer_Index[2]] = (FC_Real_00[FC_Integer_Index[2]] - TempReal)
                  • Custom script: call RemoveLocation(udg_TempPoint)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • TempBoolean Equal to True
                    • Then - Actions
                      • Set TempPoint = (Position of FC_Unit_00[FC_Integer_Index[2]])
                      • Set TempPoint = (TempPoint offset by 100.00 towards 90.00 degrees)
                      • Set TempReal = (Life of FC_Unit_00[FC_Integer_Index[2]])
                      • Set TempReal2 = (TempReal x (FC_Real_PercentageHitPoints[FC_Integer_00[FC_Integer_Index[2]]] / 100.00))
                      • Unit - Set life of FC_Unit_00[FC_Integer_Index[2]] to (TempReal + TempReal2)
                      • Floating Text - Create floating text that reads ((+ + (String((Integer(TempReal2))))) + !) at TempPoint with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
                      • Floating Text - Change (Last created floating text): Disable permanence
                      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                      • Floating Text - Change the fading age of (Last created floating text) to 1.75 seconds
                      • Floating Text - Change the lifespan of (Last created floating text) to 2.30 seconds
                      • Custom script: call RemoveLocation(udg_TempPoint)
                      • Set TempBoolean = False
                    • Else - Actions
                  • Unit Group - Remove all units from FC_UnitGroup_Damaged[FC_Integer_Index[2]]
                  • Unit - Unpause FC_Unit_00[FC_Integer_Index[2]]
                  • Unit - Turn collision for FC_Unit_00[FC_Integer_Index[2]] On
                  • Animation - Play FC_Unit_00[FC_Integer_Index[2]]'s stand animation
                  • Animation - Change FC_Unit_00[FC_Integer_Index[2]]'s animation speed to 100.00% of its original speed
                  • Set FC_Boolean[FC_Integer_Index[2]] = False
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • FC_Boolean[FC_Integer_Index[2]] Equal to False
                    • Then - Actions
                      • Set FC_Integer_Index[0] = (FC_Integer_Index[0] - 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • FC_Integer_Index[0] Equal to 0
                        • Then - Actions
                          • Set FC_Integer_Index[1] = 0
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                    • Else - Actions
            • Else - Actions
  • FC03
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer FC_Integer_IndexKnockback[2]) from 1 to FC_Integer_IndexKnockback[1], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FC_Boolean_Knockback[FC_Integer_IndexKnockback[2]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • FC_Real_03[FC_Integer_IndexKnockback[2]] Greater than 0.00
                  • (FC_Unit_01[FC_Integer_IndexKnockback[2]] is alive) Equal to True
                • Then - Actions
                  • Set TempPoint = (Position of FC_Unit_01[FC_Integer_IndexKnockback[2]])
                  • Set TempPoint = (TempPoint offset by FC_Real_05[FC_Integer_IndexKnockback[2]] towards FC_Real_04[FC_Integer_IndexKnockback[2]] degrees)
                  • Unit - Move FC_Unit_01[FC_Integer_IndexKnockback[2]] instantly to TempPoint
                  • Special Effect - Create a special effect at TempPoint using FC_String_SEffectKnockback
                  • Special Effect - Destroy (Last created special effect)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • FC_Real_03[FC_Integer_IndexKnockback[2]] Less than 100.00
                      • FC_Real_05[FC_Integer_IndexKnockback[2]] Greater than 5.00
                    • Then - Actions
                      • Set FC_Real_05[FC_Integer_IndexKnockback[2]] = (FC_Real_05[FC_Integer_IndexKnockback[2]] - 1.50)
                    • Else - Actions
                  • Set FC_Real_03[FC_Integer_IndexKnockback[2]] = (FC_Real_03[FC_Integer_IndexKnockback[2]] - FC_Real_05[FC_Integer_IndexKnockback[2]])
                  • Custom script: call RemoveLocation(udg_TempPoint)
                • Else - Actions
                  • Unit - Turn collision for FC_Unit_01[FC_Integer_IndexKnockback[2]] On
                  • Set FC_Boolean_Knockback[FC_Integer_IndexKnockback[2]] = False
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • FC_Boolean_Knockback[FC_Integer_IndexKnockback[2]] Equal to False
                    • Then - Actions
                      • Set FC_Integer_IndexKnockback[0] = (FC_Integer_IndexKnockback[0] - 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • FC_Integer_IndexKnockback[0] Equal to 0
                        • Then - Actions
                          • Set FC_Integer_IndexKnockback[1] = 0
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                    • Else - Actions
            • Else - Actions
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
I can't tell if the spell is MUI and/or leakless because i'm way too lazy (and sleepy, i'll go to bed in a moment, it's 23:36 here) to look at the triggers, but i can tell that the spell is good and interesting for sure! I like it!

I will give it a 5/5 and +rep if it gets approved! :]
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
Why do you use array variables for the MUI?
The whole spell triggers lack a basic documentation...


  • Unit - Cause FC_Unit_00[FC_Integer_Index[2]] to damage TempUnit, dealing TempReal damage of attack type Spells and damage type Normal
When the damage is magic, there's no need to check if the targets are magic immune, since they will not be damaged by it even though they are picked.

  • Custom script: call DestroyTrigger(GetTriggeringTrigger())
This is not needed. Turning the trigger off is absolutely enough.


I personally like the concept of the charge, but this thing with the % chance for restoration and is ridiculous.
 
Level 8
Joined
Dec 30, 2011
Messages
134
Why do you use array variables for the MUI?
The whole spell triggers lack a basic documentation...


  • Unit - Cause FC_Unit_00[FC_Integer_Index[2]] to damage TempUnit, dealing TempReal damage of attack type Spells and damage type Normal
When the damage is magic, there's no need to check if the targets are magic immune, since they will not be damaged by it even though they are picked.

  • Custom script: call DestroyTrigger(GetTriggeringTrigger())
This is not needed. Turning the trigger off is absolutely enough.


I personally like the concept of the charge, but this thing with the % chance for restoration and is ridiculous.

:vw_wtf:Hmmm, I think your modifications are not too important.. And yes I'm using arrays for the MUI.
Magic Immune units filter works for, if there are 15 units (10 immune) only pick that 5 units and not check all the 15 (it generates some lag)
About your comment of the chance to heal, maybe I'll change it, or not! Depends of my humor

Always, thanks for the recomendation
 
Thanks dude 5/5. Are u working on editing xD?
edit: It look like to it has little bug, stopping hero should be 10% when hit unit. That should be only once when for one units, but it's look like to it's every time when unit is picked in loop trigger, so it make chance to hero be stopped for 30% at least. So it's impossible to go into 5 units, it chance to they will stop u should be only 50%. Try it and u will see to u never can go in 5 units, he shouldn't be healed when get stopped (not logical), then he should get damage from unit.
 
Level 2
Joined
Aug 19, 2012
Messages
16
Hi! How do i make it so it doesnt stop? because i noticed it stops when it hits the first unit. btw i configured it to have 0% chance to stop and heal and it does 10x Strength in damage. please help! :D
 
Top