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

Ending a Unit Morph?

Discussion in 'Bug Reporting\Technical Issues' started by Steelb_l_ade, May 10, 2007.

  1. Steelb_l_ade

    Steelb_l_ade

    Joined:
    Apr 28, 2006
    Messages:
    188
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Is there anyway to prematurly end a unit's morph that a user cant normally cancel? Such as the demon hunters metamorphesis?

    With a trigger or JASS function?
     
  2. Mechanical Man

    Mechanical Man

    Joined:
    Jan 18, 2005
    Messages:
    5,384
    Resources:
    39
    Models:
    30
    Icons:
    3
    Packs:
    1
    Maps:
    4
    Tutorials:
    1
    Resources:
    39
    While the unit is morphing or to revert back to normal form?
     
  3. Steelb_l_ade

    Steelb_l_ade

    Joined:
    Apr 28, 2006
    Messages:
    188
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Say, demon hunter is in demon form, has about 1 minute left until he turns back, is there a triggered command to change him back imedaitly?
     
  4. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,429
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    I'm not sure it is possible in GUI, but in JASS, I think you can use something like this, but I can't guarentee it will work:
    Code (Text):
        call CasterCastAbility(GetOwningPlayer(GetTriggerUnit()),<Abil Stop Code>,"cast",GetTriggerUnit(),true)
    The native is:
    Code (Text):
    native CasterCastAbility takes player owner, integer abilid, string order, widget target, boolean instant returns unit
    I think that should work, you just need to have a "morph back" ability and have the unit cast that. If you don't want it to appear, put it in a spellbook and disable it like that. :grin:

    EDIT: JASS tags were messed up, so I had to use code tags.

    EDIT Again: This is part of the CS (caster system) so I don't know if there is another way to do the ability.
     
    Last edited: May 11, 2007
  5. NoNZealot

    NoNZealot

    Joined:
    Sep 6, 2007
    Messages:
    440
    Resources:
    0
    Resources:
    0
    Ummm for a simple idea check the monolith of blizzard maps I'm sure I saw a metamorph trigger in there, just play with it a little and I believe you will solve it.