Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Stationary Unit facing direction

Discussion in 'World Editor Help Zone' started by HerrDave, Oct 31, 2018.

  1. HerrDave

    HerrDave

    Joined:
    Dec 23, 2013
    Messages:
    1,095
    Resources:
    165
    Models:
    137
    Icons:
    20
    Skins:
    8
    Resources:
    165
    In my map, I have a unit that can toggle between packed and deployed mode.

    Mechanically he works just fine, but I'm having a problem.

    The gunner will not turn to shoot his enemies from his deployed state, instead he'll shoot them from the side of his gun or from his back.

    How do I go about fixing this?
     
  2. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,788
    Resources:
    1
    Spells:
    1
    Resources:
    1
    If a unit has 0 movespeed it can't turn to face targets; give it 1 movespeed in the OE. Alternatively I think you could edit the model to make the gunner bone(s?) in the deployed state work like a turret.
     
  3. Ether

    Ether

    Joined:
    Nov 13, 2017
    Messages:
    741
    Resources:
    3
    Skins:
    3
    Resources:
    3
    I think you may want to make the mounted gunner one as a building like a tower while having a morph/toggle ability to become mobile (as unit).
     
  4. Death Adder

    Death Adder

    Joined:
    Nov 3, 2013
    Messages:
    892
    Resources:
    0
    Resources:
    0
    Units that are immobile because of e.g. ensnare can still turn and attack or shoot.

    So you could just spawn a dummy unit with an infinitely long duration of a custom ensnare whenever the unit morphs into the stationary form, and of course you'd also need to remove the buff when it changes back to the mobile one.


    Iirc it also works with the footman defend ability if you want a no-morph one in all toggle ability, though I'm guess you don't.