• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

i need a way to make unit unable to move WITHOUT changing his movement speed to 0

Status
Not open for further replies.
Level 11
Joined
Dec 11, 2009
Messages
234
--> SetUnitPropWindow --> DisableUnitMovement
--> [code=jass] - UnitAddAbility(currentUnit, 'Amov')

If you want to make them unable to move forever, then try this:
JASS:
UnitRemoveAbility(u, 'Amov')

If you want to change it during the game:
JASS:
function DisableUnitMovement takes unit u returns nothing
    call SetUnitPropWindow(u, 0.)
endfunction

function EnableUnitMovement takes unit u returns nothing
    call SetUnitPropWindow(u, GetUnitDefaultPropWindow(u))
endfunction
GUI version:
  • Animation - Change Ghoul 0006 <gen> prop window angle to 0.00
  • Animation - Change Ghoul 0006 <gen> prop window angle to (Default prop window angle of Ghoul 0006 <gen>)
 
Level 23
Joined
Dec 4, 2007
Messages
1,574
somehow the gui version does not work on my end btw (also tried to set it to -10000, to no avail)

however, the jass version works fine
 
Status
Not open for further replies.
Top