• 🏆 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!

Morphed worker won't build (again)

Status
Not open for further replies.
Level 12
Joined
May 9, 2009
Messages
735
Okay there was a thread from 2013 with the exact same question I have but it is unsolved and closed.

I am using a morphing ability on a worker but the morphed version cannot build anything. When given the order to build he goes to the place where he needs to build and does nothing. Does anyone know how to fix this and if the old thread was already answered elsewhere?
 
Level 10
Joined
Feb 22, 2008
Messages
619
You could set up a trigger ability instead of using an actual morph ability that does basically the same thing as morph.
  • Events
    • Unit - A unit Finishes casting an ability
  • Conditions
    • (Ability being cast) Equal to cast_morph
    • ((Unit-type of (Casting unit)) Equal to Unmorphed) or ((Unit-type of (Casting unit)) Equal to Morphed)
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Casting unit)) Equal to Unmorphed
      • Then - Actions
        • Unit - Replace (Casting unit) with a Morphed using The old unit's relative life and mana
      • Else - Actions
        • Unit - Replace (Casting unit) with a Unmorphed using The old unit's relative life and mana
If only one unit type can cast this, you don't need to have this condition:
  • Conditions
    • ((Unit-type of (Casting unit)) Equal to Unmorphed) or ((Unit-type of (Casting unit)) Equal to Morphed)
If you want to have the ability have different tooltips and pictures based on the forms, then edit this trigger to check the ability being cast instead of the unit type to find out if it's morphed or not and just give the Morph ability to the Unmorphed and vice versa. (This will require a separate ability for each form).

The upside of doing this is that you can actually set any number of forms if you have enough abilities.
 
Level 6
Joined
May 20, 2014
Messages
228
The unit will end up being unselected after replacement so be sure to add this after either unit has been replaced:

  • Selection - Add (Last replaced unit) to selection
Or any other selection action that works, really.
 
Status
Not open for further replies.
Top