I did a quick experiment. Using two Mafurions (without stags) and using Crow form (a normal ability to save hero ability space). I already know basically the problems. I will place them here to give us all an idea of what is going on.
The first problem is that there are two forms of Tree of life. Rooted and uprooted. That is going to cause you problems when you try to convert from a "walking" humanoid to a living tree.
I plopped one of each version - the malfurion humaniod form and the malfurion tree form. The tree of life form will not convert its model over to the humanoid form. I tried several hero models with the same results. I suspect this has something to do with the root/uproot ability being the "default" alternative model for the tree of life. I am not a modeler I do not know how those sorts of things work.
The humanoid form will convert to tree form and back readily enough, However each time you convert from humanoid form to tree form you will either have to wait until the growth cycle is over or "uproot" immediately.
Since the tree of life comes in two forms (rooted and up rooted) you are going to have an issue with the humanoid form being "rooted" since to convert requires that the tree of life model be rooted for the spell to come up.
You will have to start off with the humanoid form of your hero.
Your hero will have to have the root ability (ancients). I tried to assign him the root ability as part of the trigger. It did not work readily. So just give him the ability.
To get around the rooting problem you are going to have to tie your crow form change ability to a trigger which will automatically cast uproot when a unit casts crow form:
-
Tree Form
-
Events
-
Unit - A unit Starts the effect of an ability
-
Conditions
-
(Ability being cast) Equal to Change Tree
-
Actions
-
Wait 0.20 seconds
-
Unit - Order (Casting unit) to Night Elf Ancients - Uproot
Change tree is the name of the customized crow form spell that I used.
If I ever want to trigger that spell I need to refer to Raven form:
-
Change into tree
-
Events
-
Conditions
-
Actions
-
Unit - Order Furion Humaniod Form 0357 <gen> to Special Medivh - Raven Form
to covert him back into human form you need to use the alternative to that spell:
-
Change into Hero
-
Events
-
Conditions
-
Actions
-
Unit - Order Furion Humaniod Form 0357 <gen> to Special Medivh - Human Form
In the custom spell (which is a copy of crow form) the alternative form is the tree of life hero the default form is, in this case, malfurion.
Start off with two copies of your hero in the Object editor. Assign your humanoid form the root ability and your customized crow form ability.
Assuming you want the stats and abilities of the tree of life, just copy everything you can from the tree of life, adding the ability of crow form *your customized version* to the alternative hero.
Keep it classified as A Hero (don't try to add the classification of A Hero to it via triggers).
The tree of life form will have to root to convert to the human form I can not figure out an around with it in a few minutes - that would most likely take me tinkering around with triggers and stuff before I figure out the ins and outs.
Since I did this in a map I already have, I will have to remove a lot of stuff from that map to make a copy of it to up load here for your edification. I'll add the map in about an hour.
Edit addition: This is not copying over true to a new map - it gets buggy when I copy it all. Let me tinker some more today and I will figure it out.
* - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
Final (I hope) Edit:
Attached please find the map Tree Me.
This map is from a campaign that I am working on presently. I cropped the map to 1/4 of its size, left the campaign screen alone (may not make sense to you) removed all of my customized units, except the two heroes that you would need, and all of my customized abilities accept the one that you need.
I did plop down a few enemy units and some elf units to go along with your two heroes.
I placed each version of the hero for your playing pleasure
.
The triggers should be straight forward and pretty much self explanatory, I tried to place comments with the ones that may have a question.
Now the way around the two models for the tree of life and root/uproot ability is to make both versions of the hero a building. Give both the root/uproot ability and the change tree ability.
As a hero your tree of life will not be able to research abilities/upgrades (sorry no can fix).
As a building your hero will have to root in order to change to either form - and I fear he will have to root in order to train his hero abilities. Sorry, again I can not figure out an around on this.
How I created the hero:
I copied and pasted two custom Malfurions without stag - One I pretty much left alone, adding the custom ability of Change Tree and added root (ancient).
The second one I changed the model, some of the stats and added the ability Change Tree.
Things I DID NOT do that you can do if you want to.
You can make a copy of the Root ability, changing some of its stats such as Duration to make it near immediately - at the moment it takes a bit of time (2.5 seconds I think).
Still use the same trigger command telling the unit to cast root as long as you copy the root ability it will work.
I did not slow down the Tree of life form of the hero - its movement is the speed of the malfurion - if you want to slow it down to the tree of life movement speed then by all means do so.
You can copy and paste - however you will need to copy both units first, then the ability - you will have to change the unknown ability for both units after you move the customized ability. Once you get those moved you can copy and past the triggers.
The trigger that you will absolutely need:
-
Tree Form
-
Events
-
Unit - A unit Starts the effect of an ability
-
Conditions
-
(Ability being cast) Equal to Change Tree
-
Actions
-
Wait 0.20 seconds
-
Unit - Order (Casting unit) to Night Elf Ancients - Uproot
-
Wait 0.20 seconds
-
Game - Display to Player Group - Player 9 (Gray) the text: In order to change ...
If you want your hero to be able to move about without uprooting after each change.
If not then you are going to have to include somewhere in your map either the game message "hero needs to be rooted to change/uprooted to move" or in your quest/help section.
I hope this helps.
BTW - DO NOT credit me for anything you use that I give you. I give it freely to you for your use and anyone else who wants to use it.
No kudos wanted or needed.
Cheers