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

Wild Axes - Dota ( RMX )

  • Like
Reactions: Kam and baassee
After looking and digging for Wild Axe in GUI, i found it, but it was so complicated that it contains the code x10 of mine.

It's a basic rather very lovely ability from DOTA and one of the most wanted abilities to be coded in GUI MUI.

Description -

The hero shoots out his two axes from his hands, they travel to the targeted area defining and rejecting all the rules of physics and gravity, then they come back to the hero.

The will Cut down trees on their path ofc.

I will implent to damage units, but just wanted to share my trigger with you people for now. ( DAMAGE ADDED )

If you don't beleive me, see by urself.




  • BT On
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blade
    • Actions
      • Set BT_Point[0] = (Position of (Casting unit))
      • Set BT_Point[1] = (Target point of ability being cast)
      • -------- ------------------------------------------------------------------------------------------------------------- --------
      • -------- ------------------------------------------------------------------------------------------------------------- --------
      • For each (Integer B1T) from 1 to 2, do (Actions)
        • Loop - Actions
          • -------- ------------------------------------------------------------------------------------------------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • BT_Times Equal to 0
            • Then - Actions
              • Trigger - Turn on BT Loop <gen>
            • Else - Actions
          • Set BT_Times = (BT_Times + 1)
          • Set BT_Loop = (BT_Loop + 1)
          • Set BT_Off[BT_Times] = True
          • -------- ------------------------------------------------------------------------------------------------------------- --------
          • -------- ------------------------------------------------------------------------------------------------------------- --------
          • Set BT_Hero[BT_Times] = (Casting unit)
          • Set BT_Part[BT_Times] = 0
          • -------- ------------------------------------------------------------------------------------------------------------- --------
          • Set BT_Main_Point[BT_Times] = (Target point of ability being cast)
          • Set BT_Angle[BT_Times] = (Angle from BT_Point[0] to BT_Point[1])
          • Set BT_Positive[BT_Times] = B1T
          • Set BT_Max_Distance[BT_Times] = (Distance between BT_Point[0] and BT_Point[1])
          • Set BT_Take_Dist[BT_Times] = 0.00
          • -------- ------------------------------------------------------------------------------------------------------------- --------
          • -------- ------------------------------------------------------------------------------------------------------------- --------
          • Set BT_Speed[BT_Times] = ((Square root(BT_Max_Distance[BT_Times])) / 2.20)
          • Set BT_Offset[BT_Times] = ((10.00 / (Square root(BT_Max_Distance[BT_Times]))) x 500.00)
          • -------- ------------------------------------------------------------------------------------------------------------- --------
          • -------- ------------------------------------------------------------------------------------------------------------- --------
          • Unit - Create 1 Dummy_For_Map for (Owner of BT_Hero[BT_Times]) at BT_Point[0] facing Default building facing degrees
          • Set BT_Dummy[BT_Times] = (Last created unit)
          • Special Effect - Create a special effect attached to the chest of (Last created unit) using Abilities\Weapons\RexxarMissile\RexxarMissile.mdl
          • Set BT_Special[BT_Times] = (Last created special effect)
      • -------- ------------------------------------------------------------------------------------------------------------- --------
      • -------- ------------------------------------------------------------------------------------------------------------- --------
      • Custom script: call RemoveLocation(udg_BT_Point[0])
      • Custom script: call RemoveLocation(udg_BT_Point[1])
  • BT Loop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • For each (Integer BT2) from 1 to BT_Times, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • BT_Off[BT2] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • BT_Take_Dist[BT2] Greater than or equal to BT_Max_Distance[BT2]
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • BT_Part[BT2] Equal to 1
                    • Then - Actions
                      • Set BT_Off[BT2] = False
                      • Set BT_Loop = (BT_Loop - 1)
                      • Custom script: call RemoveLocation(udg_BT_Main_Point[udg_BT2])
                      • -------- ------------------------------------------------------------------------------------------------------------- --------
                      • Set BT_Point[4] = (Position of BT_Dummy[BT2])
                      • Special Effect - Create a special effect at BT_Point[4] using Abilities\Weapons\GryphonRiderMissile\GryphonRiderMissileTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Custom script: call RemoveLocation(udg_BT_Point[4])
                      • Special Effect - Destroy BT_Special[BT2]
                      • Unit - Add a 0.01 second Generic expiration timer to BT_Dummy[BT2]
                      • -------- ------------------------------------------------------------------------------------------------------------- --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • BT_Loop Equal to 0
                        • Then - Actions
                          • Set BT_Times = 0
                          • Trigger - Turn off BT Loop <gen>
                        • Else - Actions
                    • Else - Actions
                      • Set BT_Part[BT2] = 1
                      • Set BT_Take_Dist[BT2] = 0.00
                • Else - Actions
                  • -------- ------------------------------------------------------------------------------------------------------------- --------
                  • Set BT_Equation[BT2] = (((4.00 x BT_Offset[BT2]) / BT_Max_Distance[BT2]) x ((BT_Max_Distance[BT2] - BT_Take_Dist[BT2]) x (BT_Take_Dist[BT2] / BT_Max_Distance[BT2])))
                  • -------- ------------------------------------------------------------------------------------------------------------- --------
                  • -------- ------------------------------------------------------------------------------------------------------------- --------
                  • Set BT_Point[2] = (Position of BT_Hero[BT2])
                  • Set BT_Max_Distance[BT2] = (Distance between BT_Point[2] and BT_Main_Point[BT2])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • BT_Part[BT2] Equal to 1
                    • Then - Actions
                      • Set BT_Angle[BT2] = (Angle from BT_Main_Point[BT2] to BT_Point[2])
                    • Else - Actions
                      • Set BT_Angle[BT2] = (Angle from BT_Point[2] to BT_Main_Point[BT2])
                  • Set BT_Point[3] = (Position of BT_Dummy[BT2])
                  • -------- ------------------------------------------------------------------------------------------------------------- --------
                  • -------- ------------------------------------------------------------------------------------------------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • BT_Part[BT2] Equal to 1
                    • Then - Actions
                      • Set BT_Point[4] = (BT_Main_Point[BT2] offset by BT_Take_Dist[BT2] towards BT_Angle[BT2] degrees)
                    • Else - Actions
                      • Set BT_Point[4] = (BT_Point[2] offset by BT_Take_Dist[BT2] towards BT_Angle[BT2] degrees)
                  • -------- ------------------------------------------------------------------------------------------------------------- --------
                  • -------- ------------------------------------------------------------------------------------------------------------- --------
                  • -------- ------------------------------------------------------------------------------------------------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • BT_Positive[BT2] Equal to 1
                    • Then - Actions
                      • Set BT_Point[5] = (BT_Point[4] offset by BT_Equation[BT2] towards (BT_Angle[BT2] + 90.00) degrees)
                    • Else - Actions
                      • Set BT_Point[5] = (BT_Point[4] offset by BT_Equation[BT2] towards (BT_Angle[BT2] - 90.00) degrees)
                  • Destructible - Pick every destructible within 125.00 of BT_Point[5] and do (Destructible - Kill (Picked destructible))
                  • -------- ------------------------------------------------------------------------------------------------------------- --------
                  • -------- ------------------------------------------------------------------------------------------------------------- --------
                  • Unit - Move BT_Dummy[BT2] instantly to BT_Point[5], facing (Angle from BT_Point[3] to BT_Point[5]) degrees
                  • Custom script: call RemoveLocation(udg_BT_Point[2])
                  • Custom script: call RemoveLocation(udg_BT_Point[3])
                  • Custom script: call RemoveLocation(udg_BT_Point[4])
                  • Custom script: call RemoveLocation(udg_BT_Point[5])
                  • -------- ------------------------------------------------------------------------------------------------------------- --------
                  • -------- ------------------------------------------------------------------------------------------------------------- --------
                  • Set BT_Take_Dist[BT2] = (BT_Take_Dist[BT2] + BT_Speed[BT2])
            • Else - Actions
Keywords:
Wild, Axes, Rexxar, Rmx, Cool, Physics !
Contents

Land of the Free (Map)

Reviews
19:12, 4th Jan 2010 The_Reborn_Devil: The triggers look good and there are no leaks. Status: Approved Rating: Recommended

Moderator

M

Moderator

19:12, 4th Jan 2010
The_Reborn_Devil:
The triggers look good and there are no leaks.

Status: Approved
Rating: Recommended
 
Level 8
Joined
May 7, 2008
Messages
108
I found a bug : when you throw the axe and then order to your hero to run back (opposite of the targeted point), the axes move slower than if you hold on.
The triggering seems clear and leakless.

Current rate : 3/5
If you fix the bug : 4/5 (not 5/5 because the idea was taken from DotA)
 

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
what equation did you use for the arc movement

I used the Simple Parabola equation that have been used for jumps, but instead i used it on XY and not on Z.

I found a bug : when you throw the axe and then order to your hero to run back (opposite of the targeted point), the axes move slower than if you hold on.

Lol that isn't a bug, it's how the ability is, it's not 100% like DOTA instead it's even better, Dota relies on the caster position ( in first cast or start effect ) but i relie on the Position of the caster while the Axes are moving.

So mine is more complicated and better.
 
Level 5
Joined
Dec 8, 2008
Messages
102
there is a bug, but it can easly be fixed.
if you cast it on your position (veary nearly of it) it will bug, the missiles will fly about 0.01 seconds and then disappear, to fix it make at cast a trigger with:
if distance < 250 (choose a worth so you cant cast it on you anymore) then
set distance = 250
endif

this would fix the bug, else gj
 
Level 25
Joined
Jun 5, 2008
Messages
2,572
It works like this:

loc1 = start point of the missile

a = original angle of the missile

You store the starting point of the missile.(loc1)

You store the original missile angle.(a)

In the loop if you want it to arc on the left side you add 90 degrees or decrease if you want it to arc on the right side to the *a*.

Then with the parabola formula you calculate the offset from the center point(center point is the *loc1* with polar projection towards the current distance of the missile with the *a* angle).

so loc2 = loc1 with polar projection towards *a* angle with *current distance* distance

Then you use another polar projection from the *loc2* towards *a +- 90* degrees with *offset* distance.

offset is calculated with Parabola equation taking in the following parameters:
*maximal offset*
*current distance the missile traveled*
*maximal distance the missile should travel*

Hope i didn't confuse anyone.
 
Level 3
Joined
Feb 20, 2008
Messages
54
I've tried using this, the damage distance and things work, but the axe effect is gone... if anyone knows why please tell me...

Anyway 5/5 nice job...
 
Level 16
Joined
Aug 20, 2009
Messages
1,552
The concept is kinda wrong....in dota, no matter the distance, it will move to the distance within the X time...(maybe 2 seconds), in here, the shorter the distance, the faster the missile move, the longer it is, the slower the axe moves...

and try casting it at the back of your unit, the axe fly between you...

and also try casting it to your own unit, see how it flies lol...

so...in dota, the longer is your distance, the faster the axes move, because it will travel there in 2 seconds.

and i found a bug in the damage,*Sometimes* when the axe is going to the given positions, it doesn't damage a unit,even though it clearly hits... and when it comes back, it does damage to the unit hit perfectly...fix that please?...

thx for making sharing me the wild axe trigger!!, Rexxar is my fav hero xD..i use it everytime i played dota.
 
Top