• 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.

[Trigger] <about DotA> about positioning abilities

Status
Not open for further replies.
Level 5
Joined
Sep 22, 2012
Messages
90
So far I've been playing/testing dota, I would like to talk about <DotA 1> regarding -slark's- leap ability and -magnus'- charge. How did the dota devs/programmers eliminate the problem of NOT disabling war3 move command? What i mean to be clear is that from the standpoint of triggers I can't seem to find a solution about two loops running together without disabling the move command.

I tried a trigger something like this:
  • somestandardloop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- some boolean pertains to another event trigger which responds if the issued command is move/attackmove/stop/hold position --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • some_boolean Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Unit - Move (Triggering unit) instantly to some_point
The problem is whenever i issue something to the unit, it just wont stop :( it keeps on moving via loop/periodic time.
Any ideas how to imitate one??

To elaborate i would like a magnus to charge/slam to a certain location then if i pressed the stop command the loop would end
 
Last edited:
Level 20
Joined
Jul 14, 2011
Messages
3,213
If you use "Unit - Set unit position" the unit will stop it's current order. If you SetUnitX and SetUnitY (JASS) the unit doesn't stop it's current order and being able to be controled.

While slark is leaping you can turn him around, but the unit will move towards it's jumping direction, no matter it's facing somewhere else. Magnus dashes forward the same way, but i think it's facing is blocked (it's set to the same angle over and over in the loop) while is moved with X/Y, the animation may be locked (set to 0%) during the dash and restored to 100% after it finishes.

Slarks just takes the Slark position and facing direction when cast. It periodically checks if there's a unit in a small radius of the next moving spot, if there isn't any, slark is moved that way (The Z height is changed with some parabola math), else, if there is any enemy unit there, the Z of Slark goes to 0 and all the movement loop stuff is stopped.

Magnus is easier, since it just dashes towards target point of ability being cast in a straight line (No Z involved).

You can search around for tutorials about Wc3 triggered movement.
 
Status
Not open for further replies.
Top