Movement Issues

NoobImbaPro

You can change this now in User CP.
Reaction score
60
Is there any efficient way to stop any moving order, except when I enable it??

Because waiting 0.01 seconds and then call IssueImediateOrder(unit, "stop") doesn't help me.
 

luorax

Invasion in Duskwood
Reaction score
67
Pause the unit, order it to stop and remove the pause:

JASS:
scope MoveDisabler initializer init
private function Act takes nothing returns boolean
    if GetIssuedOrderId()==851986 /*move*/ or GetIssuedOrderId()==851971 /*smart*/ then
        call PauseUnit(GetTriggerUnit(),true)
        call IssueImmediateOrder(GetTriggerUnit(),"stop")
        call PauseUnit(GetTriggerUnit(),false)
    endif
    return false
endfunction
private function init takes nothing returns nothing
    local trigger t=CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
    call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
    call TriggerAddCondition(t,Condition(function Act))
endfunction
endscope


This one helped me.
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
I order a unit every 0.15 seconds to go about 100 units far away with this action
JASS:
call IssuePointOrderById(.unit, moveID, .x, .y)

And it stops for ~0.0001 sec and resets its animation like it was his first movement after stand animation. When I press the move order (hotkey "M") 10 times a sec unit continues walking normally.

Is there any way to avoid that??
PS: It has nothing to do with above scope
 

Nestharus

o-o
Reaction score
84
Have to issue a stop order before moving again


Always issue stop before issuing an order
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
I use T32 with a period of 0.03125, I am calling a movement order every these seconds. The movement is done with arrows. Hero always stops because I don't know if these are many orders. Then I used my timer with 0.15 - 0.25 cooldown, same shit happened. But when I press move order with hotkey m 10 times a sec he walks normally, like the first order was updated not recreated.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
The movement order resets the unit animation -- you have to periodically "move" the unit yourself using coordinates.

Also, you must issue the unit's "walk" animation using "SetUnitAnimationByIndex" to make it look like moving instead of just "sliding".

And an other tip:

Don't use arrows for this kind of system, because you have to lock the camera (to a specified unit, a point) to make it work nicely --
and even then it looks stupid because the camera "wants" to move.

Use dummy spells (based on "Channel") and make it WASD movement -- if your map allows it.
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
I already lock the unit :D But then I have to change from order to set unit x,y?
It works very good, the unit that stops is the problem because of many orders per second. I thought if there was something like updating order, would be very cool, as wc3 handles movement greatly.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
The problem is the animation - issuing a new order resets the animation.

So yes, you must use "SetUnitX/Y" bundled with "SetUnitAnimationByIndex".
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top