• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Ax Toss v1.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: deepstrasz
Triggers
  • AT setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set ATHash = (Last created hashtable)
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
  • AT Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ax Toss
    • Actions
      • Set TempUnit1 = (Triggering unit)
      • Set TempInteger1 = (Level of (Ability being cast) for TempUnit1)
      • Set TempPoint1 = (Position of TempUnit1)
      • Set TempPoint2 = (Target point of ability being cast)
      • Set TempPlayer = (Triggering player)
      • Set TempReal1 = (Angle from TempPoint1 to TempPoint2)
      • Unit - Create 1 AT Missile for TempPlayer at TempPoint1 facing TempReal1 degrees
      • Set TempUnit2 = (Last created unit)
      • Custom script: set udg_TempInteger2 = GetHandleId(udg_TempUnit2)
      • Custom script: call SaveReal(udg_ATHash,udg_TempInteger2,5,udg_TempReal1)
      • -------- Distance --------
      • Set TempReal1 = (400.00 + (100.00 x (Real(TempInteger1))))
      • Custom script: call SaveReal(udg_ATHash,udg_TempInteger2,0,udg_TempReal1)
      • -------- Speed --------
      • Set TempReal1 = 30.00
      • Custom script: call SaveReal(udg_ATHash,udg_TempInteger2,1,udg_TempReal1)
      • -------- Damage --------
      • Set TempReal1 = ((Real(TempInteger1)) x 85.00)
      • Custom script: call SaveReal(udg_ATHash,udg_TempInteger2,2,udg_TempReal1)
      • Custom script: call SaveUnitHandle(udg_ATHash,udg_TempInteger2,3,udg_TempUnit1)
      • Custom script: call SaveReal(udg_ATHash,udg_TempInteger2,4,0.0)
      • Unit Group - Add TempUnit2 to ATGroup
      • Trigger - Turn on AT Periodic <gen>
      • Custom script: call RemoveLocation(udg_TempPoint1)
      • Custom script: call RemoveLocation(udg_TempPoint2)
  • AT Periodic
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ATGroup and do (Actions)
        • Loop - Actions
          • Set TempUnit1 = (Picked unit)
          • Custom script: set udg_TempInteger1 = GetHandleId(udg_TempUnit1)
          • Custom script: set udg_TempReal1 = LoadReal(udg_ATHash,udg_TempInteger1,0)
          • Custom script: set udg_TempReal2 = LoadReal(udg_ATHash,udg_TempInteger1,1)
          • Custom script: set udg_TempReal3 = LoadReal(udg_ATHash,udg_TempInteger1,2)
          • Custom script: set udg_TempReal4 = LoadReal(udg_ATHash,udg_TempInteger1,4)
          • Custom script: set udg_TempReal5 = LoadReal(udg_ATHash,udg_TempInteger1,5)
          • Custom script: set udg_TempUnit2 = LoadUnitHandle(udg_ATHash,udg_TempInteger1,3)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TempReal4 Less than TempReal1
            • Then - Actions
              • Set TempReal4 = (TempReal4 + TempReal2)
              • Custom script: call SaveReal(udg_ATHash,udg_TempInteger1,4,udg_TempReal4)
              • Set TempPoint1 = (Position of TempUnit1)
              • Set TempPoint2 = (TempPoint1 offset by TempReal2 towards TempReal5 degrees)
              • Custom script: call SetUnitX(udg_TempUnit1,GetLocationX(udg_TempPoint2))
              • Custom script: call SetUnitY(udg_TempUnit1,GetLocationY(udg_TempPoint2))
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within 50.00 of TempPoint2 matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an enemy of (Owner of TempUnit1)) Equal to True))) and do (Actions)
                • Loop - Actions
                  • Hashtable - Clear all child hashtables of child TempInteger1 in ATHash
                  • Unit - Kill TempUnit1
                  • Unit Group - Remove TempUnit1 from ATGroup
                  • Set TempUnit3 = (Picked unit)
                  • Unit - Cause TempUnit2 to damage TempUnit3, dealing TempReal3 damage of attack type Pierce and damage type Force
                  • Set TempPoint3 = (Position of TempUnit2)
                  • Set TempPoint4 = (Position of TempUnit3)
                  • Custom script: set udg_TempInteger1 = GetHandleId(udg_TempUnit2)
                  • -------- Jump Height Speed --------
                  • Set TempReal1 = (250.00 x 0.03)
                  • Custom script: call SaveReal(udg_ATHash,udg_TempInteger1,0,udg_TempReal1)
                  • -------- Time --------
                  • Set TempReal2 = 1.00
                  • -------- Angel --------
                  • Set TempReal3 = (Angle from TempPoint3 to TempPoint4)
                  • Custom script: call SaveReal(udg_ATHash,udg_TempInteger1,4,udg_TempReal3)
                  • -------- Distance --------
                  • Set TempReal4 = (Distance between TempPoint3 and TempPoint4)
                  • Custom script: call SaveReal(udg_ATHash,udg_TempInteger1,1,udg_TempReal4)
                  • -------- Jump Speed --------
                  • Set TempReal5 = ((TempReal4 / TempReal2) x 0.03)
                  • Custom script: call SaveReal(udg_ATHash,udg_TempInteger1,2,udg_TempReal5)
                  • Custom script: call SaveReal(udg_ATHash,udg_TempInteger1,3,0)
                  • Custom script: if UnitAddAbility(udg_TempUnit2,'Amrf') then
                  • Custom script: call UnitRemoveAbility(udg_TempUnit2,'Amrf')
                  • Custom script: endif
                  • Unit - Turn collision for TempUnit2 Off
                  • Unit Group - Add TempUnit2 to LeapGroup
                  • Trigger - Turn on Leap Periodic <gen>
                  • Custom script: call RemoveLocation(udg_TempPoint3)
                  • Custom script: call RemoveLocation(udg_TempPoint4)
              • Custom script: call RemoveLocation(udg_TempPoint1)
              • Custom script: call RemoveLocation(udg_TempPoint2)
            • Else - Actions
              • Unit - Kill TempUnit1
              • Unit Group - Remove TempUnit1 from ATGroup
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (ATGroup is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
  • Leap Periodic
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in LeapGroup and do (Actions)
        • Loop - Actions
          • Set TempUnit1 = (Picked unit)
          • Custom script: set udg_TempInteger1 = GetHandleId(udg_TempUnit1)
          • -------- Jump Height --------
          • Custom script: set udg_TempReal1 = LoadReal(udg_ATHash,udg_TempInteger1,0)
          • -------- Distance --------
          • Custom script: set udg_TempReal2 = LoadReal(udg_ATHash,udg_TempInteger1,1)
          • -------- Velocity --------
          • Custom script: set udg_TempReal3 = LoadReal(udg_ATHash,udg_TempInteger1,2)
          • -------- Distance Covered --------
          • Custom script: set udg_TempReal4 = LoadReal(udg_ATHash,udg_TempInteger1,3)
          • -------- Angel --------
          • Custom script: set udg_TempReal5 = LoadReal(udg_ATHash,udg_TempInteger1,4)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TempReal4 Less than TempReal2
            • Then - Actions
              • Set TempReal4 = (TempReal4 + TempReal3)
              • Custom script: call SaveReal(udg_ATHash,udg_TempInteger1,3,udg_TempReal4)
              • Set TempPoint1 = (Position of TempUnit1)
              • Set TempPoint2 = (TempPoint1 offset by TempReal3 towards TempReal5 degrees)
              • Unit - Move TempUnit1 instantly to TempPoint2
              • Custom script: call RemoveLocation(udg_TempPoint1)
              • Custom script: call RemoveLocation(udg_TempPoint2)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (TempReal2 x 0.50) Less than or equal to TempReal4
                • Then - Actions
                  • Set TempReal1 = (TempReal1 x -1.00)
                • Else - Actions
              • Animation - Change TempUnit1 flying height to ((Current flying height of TempUnit1) + TempReal1) at 0.00
            • Else - Actions
              • Animation - Change TempUnit1 flying height to (Default flying height of TempUnit1) at 0.00
              • Unit Group - Remove TempUnit1 from LeapGroup
              • Special Effect - Create a special effect attached to the origin of TempUnit1 using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Turn collision for TempUnit1 On
              • Hashtable - Clear all child hashtables of child TempInteger1 in ATHash
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (LeapGroup is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
Tooltip
tool.jpg
Requested by thegreatninjaman in my spell workshop

Keywords:
Ax, Ax Throw, Ax Toss, Leap, Jump, Missile
Contents

Lightning Strike v1.0 (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Add importing instructions into the map file In AT Periodic you load all that stuff in the beginning, but you don't need them in the ELSE. Only load the stuff in THEN Do group == empty...

Moderator

M

Moderator

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

Reviewed by Maker, Ax Toss v1.0, 9th Feb 2012

  • Add importing instructions into the map file
  • In AT Periodic you load all that stuff in the beginning, but you don't need them in the ELSE. Only load the stuff in THEN
  • Do group == empty only after you remove a unit from the group
  • Child hashtable can remain unflushed for the dummy in AT Periodic
  • You could filter out dead units in the unit group pick in AT Periodic
You could use a smoother method for the jump, a parabola equation or utilize Sin function.
 
I don't know if the spell is MUI, but you have to set the target location in the loop trigger. Because if i cast Ax Toss then the target moves - i don't actually go to the target, i go where the target WAS. That's the only problem i encountered. :)

Physics doesn't allow you to change your velocity unless acted on by another force, keep in mind the unit is supposed to leap, not fly.
I'll be updating this to makers request in a few years
 
Last edited:
Level 8
Joined
Oct 12, 2011
Messages
483
As well as speeding up the jump, imo you should have a higher arc and/or some special effect while jumping. High arc + speed + visual effect = more visible. The first time I casted the ability I thought I was just normal running to the enemy...
 
Top