Skill Shots

Hildagarn

Member
Reaction score
20
i'm trying to make an ability that shoots a hammer that travels 600 in the direction of casts, and if the first thing it hits is damaged and stunned

I know that the Hammer is a dumy unit and i got that, but i have no clue what to do next...

Trigger:
  • Mallet
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mallet
    • Actions
      • Unit - Create 1 Mallet for Player 1 (Red) at (Position of (Casting unit)) facing (Position of (Triggering unit))
      • Unit - Order (Last created unit) to Move To ((Target point of ability being cast) offset by ((X of (Target point of ability being cast)), (Y of (Target point of ability being cast))))

.....
 

Shura

New Member
Reaction score
45
Make a new trigger with no event, and have your trigger add the event, A Unit Comes withing Range of (Last Created Unit). Then the new trigger will run when a unit comes within range of the hammer, so you would check to make sure the unit within range is an enemy unit, and if it is, you would stun the unit and remove the hammer.
 

Carnerox

The one and only.
Reaction score
84
Once my world editor is done removing all shadows, i'll get the trigger... :rolleyes:



Edit* Here
Trigger:
  • Actions
    • Set Caster[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
    • Set PlayerOwner[(Player number of (Owner of (Triggering unit)))] = (Owner of (Triggering unit))
    • Set CasterLoc[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
    • Set TargetLoc[(Player number of (Owner of (Triggering unit)))] = ((Position of (Triggering unit)) offset by 600.00 towards (Facing of (Triggering unit)) degrees)
    • Unit - Create 1 (YourUnit) for PlayerOwner[(Player number of (Owner of (Triggering unit)))] at CasterLoc[(Player number of (Owner of (Triggering unit)))] facing Default building facing (270.0) degrees
    • Set DummyUnit[(Player number of (Owner of (Last created unit)))] = (Last created unit)
    • Unit - Order DummyUnit[(Player number of (Owner of (Last created unit)))] to Move To TargetLoc[(Player number of (Owner of (Triggering unit)))]
    • Set CasterLoc[(Player number of (Owner of (Triggering unit)))] = (Position of DummyUnit[(Player number of (Owner of (Last created unit)))])
    • Wait until ((Distance between CasterLoc[(Player number of (Owner of (Triggering unit)))] and TargetLoc[(Player number of (Owner of (Triggering unit)))]) Greater than or equal to (>=) 0.00), checking every 0.10 seconds
    • Unit - Remove DummyUnit[(Player number of (Owner of (Triggering unit)))] from the game


Tho idk if this will work.
 

Zanderist

New Member
Reaction score
5
I just want to ask, what happens when this trigger fires and right then a unit is created from the barracks?

Does it make that last unit created at the barracks do the ordered move?

And I think you can maybe add a wait-condition trigger. That last created unit is range 600 from casting unit, then kill last created unit.
 

Ayanami

칼리
Reaction score
288
I just want to ask, what happens when this trigger fires and right then a unit is created from the barracks?

Does it make that last unit created at the barracks do the ordered move?

And I think you can maybe add a wait-condition trigger. That last created unit is range 600 from casting unit, then kill last created unit.

(Last created unit) is only referred to the unit created by trigger via the action "Unit - Create Unit".

To make it disappear in 600 range, create a periodic trigger to slide the hammer dummy. Then have a real variable to count the distance periodically. Once it reaches 600, remove the dummy.
 

Carnerox

The one and only.
Reaction score
84
Yea that to :\
Trigger:
  • Unit - Add a (Distance between (Position of (Triggering unit)) and ((Center of (Playable map area)) offset by 600.00 towards (Facing of (Triggering unit)) degrees)) second Generic expiration timer to (Triggering unit)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top