Hero passive transformation

Level 5
Joined
Dec 29, 2009
Messages
2

Goal

The goal of this tutorial is to transform a hero passively (without using an active ability that could be disabled or interrupt his current order), without using the Chaos ability, since it is completely buggy and only usable with regular units.
(see PitzerMike's brilliant Ability Guide for more details)

Method

Say you want to transform a hero, whose unit-type is "Unit Type 1", into "Unit Type 2".
  1. You need to create an ability based on Bear Form [Abrf] (though any other permanent transformation probably works too).
  2. Then (this is the hard part of this method) put in "Unit Type 1" in the "Alternate Form Unit" field of the spell, and "Unit Type 2" in the "Normal Form Unit", as illustrated in this image:

    attachment.php

  3. Now, to transform your unit, you just need to add and remove the Bear Form ability to your unit to transform:
    • Actions
      • Unit - Add Transformation 1->2 to YourUnit
      • Unit - Remove Transformation 1->2 from YourUnit
  4. Your unit is now permanently transformed into "Unit Type 2", and will not morph back at any point without using this method again, or some morphing ability.

How not to fail at using this method

  1. Fill out the data fields correctly: the "Normal Form" field is the unit you morph TO, the "Alternate Form" field is the unit you morph FROM.
  2. You only need to add and remove the ability: do not set the ability as unavailable for the player owning the unit, or nothing will happen.

Known (minor) bugs

This method can create some weird results in particular circumstances, but they can easily be avoided:
  1. If the unit is hexed when you try to transform it, the unit will permanently gain some movement speed. (also named the 1.25 bug)
    This can be avoided by simply checking whether the unit is hexed or not before transforming it. (then use whatever method you see fit to make sure it transforms when it stops being hexed)
  2. If the unit you morph to uses animations with a tag (like "alternate"), and the unit is currently idling, it will stay in its base animations (with no tag) until it stops idling.
    This can be avoided by manually adding the tag to the unit.
    • Animation - Add the alternate animation tag to YourUnit
 

Attachments

  • objectdata.png
    objectdata.png
    17.3 KB · Views: 9,748
Level 25
Joined
Aug 18, 2009
Messages
4,081
Aside from your mentioned minor bugs, do you know which stats fail to get removed/applied by the new type? For example have heard about cast point or the build menu remaining.

Thing is, you could have a base unit type and two abilities for each other unit type to convert the base into the target type and backwards. This way, it would be possible to arbitrarily change a unit's type ingame with a linear increment of objects. Nowadays, I use to trigger nearly all unit stats but resetting the model/icon is a bit problematic and therefore this would be a shortcut.
 
Level 7
Joined
May 11, 2010
Messages
278
so if i switch my Unit Type 1 to Unit Type 2, and then want to switch it back, do i have to make another ability that works the other way around? (switch places of Unit Type 1 and 2)
or can i just re-run the trigger?
 
Level 16
Joined
Aug 7, 2009
Messages
1,407
I said it once, and I'm going to say it again: Blizzard is trolling.
They haven't fixed a single reported bug in ages (1.26 patch doesn't count, they only fixed a bug that appeared when they tried to fix a bug in 1.25)

No, everything is going according to the planes:
More people getting tired of the buggy WC3 map editor->more people buying StartCraft 2->More money for Blizzard->Profit->(More people realizing that the StarCraft 2's atmosphere sucks, no matter how great its editor is->More people leaving Blizzard's games; but this is just an additional info)
 
Level 1
Joined
May 3, 2012
Messages
1
Question - Ability: Transform

If the game needed 3 forms; a DPS, a Tank and a Healer all in one... how can you make the ability change you when needed? (I.E. being attacked heavily changes you to tank, allies have low health change to healer and when there are enemies nearby instant change to DPS) :vw_wtf:
A screenshot: http://www.hiveworkshop.com/forums/members/217583-albums5559-picture57830.html

could you show a trigger(s) that can do this? thanks!
I have a feeling it isn't that difficult now that I typed it out haha
~Glow_Stick


- also a music producer (Dubstep too!) on newgrounds com, name: Opaix (Electrolord99 username) -
 
Level 16
Joined
Jul 17, 2011
Messages
1,864
If the game needed 3 forms; a DPS, a Tank and a Healer all in one... how can you make the ability change you when needed? (I.E. being attacked heavily changes you to tank, allies have low health change to healer and when there are enemies nearby instant change to DPS) :vw_wtf:
A screenshot: http://www.hiveworkshop.com/forums/members/217583-albums5559-picture57830.html

could you show a trigger(s) that can do this? thanks!
I have a feeling it isn't that difficult now that I typed it out haha
~Glow_Stick


- also a music producer (Dubstep too!) on newgrounds com, name: Opaix (Electrolord99 username) -

well you will need 3 units for that and you will only be able to morph to a healer when morphed to a tank.
if you start with a dps then you can morph to a tank and then to a healer and then back to dps
its not a good idea to automatically change the ability based on conditions tho
 
Level 1
Joined
Oct 14, 2014
Messages
2
Hi!

I need a Help , I'm creating a custom map like a ''DotA'' , but have a problem!
I'm making skill ''Change Courier Type'' (Replaces old unit-type with a new unit).
It's working but , when I start of another ability within Courier like ''Burst'' (Makes courier move faster for 20 seconds. Cooldown: 40 seconds) , then start again with ''Change Courier Form'' It will replace old unit with a new unit , but after changing set's ''Burst'' cooldown to 0.

Any idea how to fix it? , Replaced unit's save ability cooldowns of prewious unit.
 
You can make all of the units already for the players, then hide the others. If one casts burst, make them all cast burst. Then when you use GCT, just hide the current courier (and possibly place it in a safe place, together with all the other couriers), then get another courier from the list, put it on the old courier's position and unhide it..
 
I have two questions about this method:

1) does it require to set all abilities as "permanent" if I want them to carry over to the new unit?
2) does the UnitTypeId change? I know that the handle ID remains the same, but is my morphed unit still considered the same type as the original?

So, for example, if my original unit is a footman and the new unit is an archer, will any "Is unit a footman" checks still return true even when morphed?
 
Top