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

how to make units unable to move but still able to rotate

Status
Not open for further replies.
JASS:
//  DisableUnitMovement /* v1.0.0.1
//    *   Disables unit movement. They can still turn, but will stay in
//    *   place. It simulates an ensnare-like effect, except that it will
//    *   not ground units, it does not have buffs, does not interrupt
//    *   channeled casts and appears to have no downsides.
//    *   Full credits to WaterKnight for discovering this technique.
//--------------------------------------------------------------------        
function DisableUnitMovement takes unit u returns nothing
    call SetUnitPropWindow(u, 0)
endfunction
//--------------------------------------------------------------------     
function EnableUnitMovement takes unit u returns nothing
    call SetUnitPropWindow(u, GetUnitDefaultPropWindow(u) * bj_DEGTORAD)
endfunction

zibi
 
Status
Not open for further replies.
Top