• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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

Status
Not open for further replies.
Level 10
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 21
Joined
Dec 4, 2007
Messages
1,478
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