1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  5. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  6. The 13th Music Contest Poll is up! Vote for the best tracks in this symphony of frost and flame.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

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

Discussion in 'World Editor Help Zone' started by emil23, Feb 14, 2020.

  1. emil23

    emil23

    Joined:
    Jul 17, 2013
    Messages:
    276
    Resources:
    1
    Maps:
    1
    Resources:
    1
    i realised that in reforged units that have 0 movement speed cant be shown upside dooad, and i really need them to show upside but they shouldnt be aswell able to move
     
  2. BizzaroFukuro

    BizzaroFukuro

    Joined:
    Dec 11, 2009
    Messages:
    171
    Resources:
    2
    Maps:
    2
    Resources:
    2
    --> SetUnitPropWindow --> DisableUnitMovement
    --> [JASS] - UnitAddAbility(currentUnit, 'Amov')

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


    If you want to change it during the game:
    Code (vJASS):
    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>)
     
  3. A]mun

    A]mun

    Joined:
    Dec 4, 2007
    Messages:
    783
    Resources:
    0
    Resources:
    0
    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
     
  4. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,689
    Resources:
    1
    Spells:
    1
    Resources:
    1
    You can also dummy cast Entangling Roots with infinite duration on the unit.
     
  5. Daffa

    Daffa

    Joined:
    Jan 30, 2013
    Messages:
    7,847
    Resources:
    28
    Packs:
    1
    Maps:
    8
    Spells:
    17
    Tutorials:
    2
    Resources:
    28
    The GUI version used a BJ variant of PropWindow that protects the bound from being 0. People need to use the Jass version @BizzaroFukuro provided.
     
  6. emil23

    emil23

    Joined:
    Jul 17, 2013
    Messages:
    276
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I found out i can set movement type to float unit wont move then