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

Re-add the 'Amov' ability ? / Stop a point order ?

Status
Not open for further replies.

Ardenian

A

Ardenian

I add and remove the 'Amov' to interrupt a point order of a unit.

JASS:
call UnitRemoveAbility(u, 'Amov')
call SetUnitFacingTimed(u, angle, duration)
call UnitAddAbility(u, 'Amov')

However, appearently it cannot be re-added.
Am I right or did I miss something ? Is there a way to avoid this ?

Is there another way to permanently remove movement
( note, I tried using the object editor, however, other issues came up, so I
need a solution without touching the Object Editor, please)
or to interrupt an order ?

Appearently
JASS:
function
    call IssueImmediateOrder(u,"stop") 
    call SetUnitFacingTimed(u, angle, duration)
endfunction
//
call TriggerRegisterUnitEvent( gg_trg_Order, u, EVENT_UNIT_ISSUED_POINT_ORDER )
does not stop the unit from executing the order if in the trigger action of the event.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
it doesnt work because order events fire before the unit starts the order, so you order it to stop, but only on the next logical frame the unit actually starts moving, you would have to fire 0 second timer to actually stop it this way. Or as Draco said, pause, stop, unpase, that works too for whatever magical reason
 
Status
Not open for further replies.
Top