Tutorial Morphing Heroes

N

Naruto[Leaf]

Guest
Tutorial : Morphing Heroes (The Effective Way)

There are many ways to morph heroes, but I've made a combination of effective triggers that work together in GUI. I'm not saying my way is golden but, it works well for me :) It may need WEU, I haven't fully confirmed it though sorry. It also has alot of actions in order to make sure there aren't any mistakes. 2 Triggers Total.
Variables:
Morpher - Unit Variable (Used to keep track of Hero XD)
HpMp - (Array 2) Real Variable (Used to keep track of HP and MP)
Stats - Integer Variable (Used to keep track of Morphing heroes stat points)
LvLHero - Integer Variable (Used to keep track of Level)
LvLMove - (Array # of abilities) Integer Variable (Used to keep track of level of abilities)
LearnedAbility - (Array # of abilities) Ability Variable

Abilities : (Suggested Abilities used when Morphing)
Fan of Knives - Rename it to the name of morph. Remove all buffs, attacks,
damage. Add cooldown and mana cost so your Morph isn't
cooldown spammable. (Fan of knives is great base move
due to the one click change. You can use others but in
my example I used Knives)

The Triggers :
For my Morph I took it off my AOS map in progress. When recreating the following triggers please note that one must be initially off as I will explain in the end.

Morph to Hero 2 (MUST BE INITIALLY ON!!!)
Code:
Orc Mastery
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Orc Elements 
    Actions
        Set BloodXfusion = (Triggering unit)
        Set HitpointsandMana[1] = (Life of BloodXfusion)
        Set HitpointsandMana[2] = (Mana of BloodXfusion)
        Set statpoints = (Unspent skill points of BloodXfusion)
        Set LevelofMalRoc = (Hero experience of BloodXfusion)
        Set LevelofMove[1] = (Level of Vortex of a Thousand Blades  for BloodXfusion)
        If ((Level of Vortex of a Thousand Blades  for BloodXfusion) Greater than 0) then do (Set LearnedAbility[1] = Phoenix of a Thousand Blades ) else do (Do nothing)
        Set LevelofMove[2] = (Level of Quake of a Thousand Blades  for BloodXfusion)
        If ((Level of Quake of a Thousand Blades  for BloodXfusion) Greater than 0) then do (Set LearnedAbility[2] = Droplets of a Thousand Blades ) else do (Do nothing)
        Set LevelofMove[3] = (Level of Thousand Blade Finesse  for BloodXfusion)
        If ((Level of Thousand Blade Finesse  for BloodXfusion) Greater than 0) then do (Set LearnedAbility[3] = Thousand Blade Finesse ) else do (Do nothing)
        Set LevelofMove[4] = (Level of Thousand Blade Mastery  for BloodXfusion)
        If ((Level of Thousand Blade Mastery  for BloodXfusion) Greater than 0) then do (Set LearnedAbility[4] = Thousand Blade Mastery ) else do (Do nothing)
        Set LevelofMove[5] = (Level of Attribute Bonus for BloodXfusion)
        If ((Level of Attribute Bonus for BloodXfusion) Greater than 0) then do (Set LearnedAbility[5] = Attribute Bonus) else do (Do nothing)
        Advanced - Replace BloodXfusion by a new unit of type Swordsman of the Blades (Strength) using The old unit's life and mana
        Set BloodXfusion = (Last replaced unit)
        Selection - Select BloodXfusion for (Owner of BloodXfusion)
        Hero - Set BloodXfusion experience to 1, Hide level-up graphics
        Hero - Set BloodXfusion experience to LevelofMalRoc, Hide level-up graphics
        Hero - Learn skill for BloodXfusion: LearnedAbility[1]
        Hero - Learn skill for BloodXfusion: LearnedAbility[2]
        Hero - Learn skill for BloodXfusion: LearnedAbility[3]
        Hero - Learn skill for BloodXfusion: LearnedAbility[4]
        Hero - Learn skill for BloodXfusion: LearnedAbility[5]
        Hero - Modify unspent skill points of BloodXfusion: Set to statpoints points
        Unit - Set life of BloodXfusion to HitpointsandMana[1]
        Unit - Set mana of BloodXfusion to HitpointsandMana[2]
        Unit - Set Level of LearnedAbility[1] for BloodXfusion to LevelofMove[1]
        Unit - Set Level of LearnedAbility[2] for BloodXfusion to LevelofMove[2]
        Unit - Set Level of LearnedAbility[3] for BloodXfusion to LevelofMove[3]
        Unit - Set Level of LearnedAbility[4] for BloodXfusion to LevelofMove[4]
        Unit - Set Level of LearnedAbility[5] for BloodXfusion to LevelofMove[5]
        Unit - Remove Orc Elements  from BloodXfusion
        Unit - Add Elven Elements  to BloodXfusion
        Unit - Order BloodXfusion to Night Elf Warden - Fan Of Knives
        Trigger - Turn on Elven Mastery <gen>
        Trigger - Turn off (This trigger)
Morph back to Hero 1 (MUST BE INITIALLY OFF!!)
Code:
Elven Mastery
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Elven Elements 
    Actions
        Set BloodXfusion = (Triggering unit)
        Set HitpointsandMana[1] = (Life of BloodXfusion)
        Set HitpointsandMana[2] = (Mana of BloodXfusion)
        Set statpoints = (Unspent skill points of BloodXfusion)
        Set LevelofMalRoc = (Hero experience of BloodXfusion)
        Set LevelofMove[1] = (Level of Phoenix of a Thousand Blades  for BloodXfusion)
        If ((Level of Phoenix of a Thousand Blades  for BloodXfusion) Greater than 0) then do (Set LearnedAbility[1] = Vortex of a Thousand Blades ) else do (Do nothing)
        Set LevelofMove[2] = (Level of Droplets of a Thousand Blades  for BloodXfusion)
        If ((Level of Droplets of a Thousand Blades  for BloodXfusion) Greater than 0) then do (Set LearnedAbility[2] = Quake of a Thousand Blades ) else do (Do nothing)
        Set LevelofMove[3] = (Level of Thousand Blade Finesse  for BloodXfusion)
        If ((Level of Thousand Blade Finesse  for BloodXfusion) Greater than 0) then do (Set LearnedAbility[3] = Thousand Blade Finesse ) else do (Do nothing)
        Set LevelofMove[4] = (Level of Thousand Blade Mastery  for BloodXfusion)
        If ((Level of Thousand Blade Mastery  for BloodXfusion) Greater than 0) then do (Set LearnedAbility[4] = Thousand Blade Mastery ) else do (Do nothing)
        Set LevelofMove[5] = (Level of Attribute Bonus for BloodXfusion)
        If ((Level of Attribute Bonus for BloodXfusion) Greater than 0) then do (Set LearnedAbility[5] = Attribute Bonus) else do (Do nothing)
        Advanced - Replace BloodXfusion by a new unit of type Swordsman of the Blades (Agility) using The old unit's life and mana
        Set BloodXfusion = (Last replaced unit)
        Hero - Set BloodXfusion experience to 1, Hide level-up graphics
        Hero - Set BloodXfusion experience to LevelofMalRoc, Hide level-up graphics
        Selection - Select BloodXfusion for (Owner of BloodXfusion)
        Hero - Learn skill for BloodXfusion: LearnedAbility[1]
        Hero - Learn skill for BloodXfusion: LearnedAbility[2]
        Hero - Learn skill for BloodXfusion: LearnedAbility[3]
        Hero - Learn skill for BloodXfusion: LearnedAbility[4]
        Hero - Modify unspent skill points of BloodXfusion: Set to statpoints points
        Unit - Set life of BloodXfusion to HitpointsandMana[1]
        Unit - Set mana of BloodXfusion to HitpointsandMana[2]
        Unit - Set Level of LearnedAbility[1] for BloodXfusion to LevelofMove[1]
        Unit - Set Level of LearnedAbility[2] for BloodXfusion to LevelofMove[2]
        Unit - Set Level of LearnedAbility[3] for BloodXfusion to LevelofMove[3]
        Unit - Set Level of LearnedAbility[4] for BloodXfusion to LevelofMove[4]
        Unit - Set Level of LearnedAbility[5] for BloodXfusion to LevelofMove[5]
        Unit - Remove Elven Elements  from BloodXfusion
        Unit - Add Orc Elements  to BloodXfusion
        Unit - Order BloodXfusion to Night Elf Warden - Fan Of Knives
        Trigger - Turn on Orc Mastery <gen>
        Trigger - Turn off (This trigger)

Ok as you can see there are alot of actions.

Firstly, The reason why there are so much "Learned Ability" and "Set Level of Ability" is because of the number of moves. The set of actions, "Hero - Learn skill blah blah blah." Is to make it so the new hero has already learned an ability that was in the same occupant spot as the previous hero. This also leads to the ability to actually letting the trigger set levels. For instance if Hero 1 had Fire Bolt level 3 in Location (3,2), Hero 2 will have whatever ability assigned to (3,2) and it will be teched and level 3 as well.

Secondly, If you haven't noticed, I've set one of the triggers off while the other on. If you have left both triggers on, the morphing of abilities would be instant and the cooldown will not be set. My hero has the ability Elven Mastery in second form. If I've left both triggers on, "Unit - Add Elven Elements to BloodXfusion
Unit - Order BloodXfusion to Night Elf Warden - Fan Of Knives" That line would have caused the other trigger to set off leading into and infinite morphing stage and a possiblity of game crash. The reason why I added the new ability and order it to cast and turn on the next hero trigger, and turn off the previous is too create an effect of a cooldown stage. This is basically for balance purpose and so a hero cannot spam off 10 spells every second. (5 abilities x 2 Interchangeable heroes)

Thirdly, you'll see a confusing line where it says "Hero - set experiance to 1" then after "Hero - set to MalrocLevel" That's only for me lol. It's because my morphable hero has diffrent stats and makes it so when you switch back the addition of stats doesn't build up. You can just delete the "Set to one" crap or use if you want to keep a hero with different stats, I don't care lol.

Well I suppose this is the end of my would be morph tutorial sorry if it sux. It works for me. If you need any questions just post :)
 

Archer 1

New Member
Reaction score
2
Very good! however, can't you just use abilities like Bear form, stuff like that? Without using triggers? I'm not sure, i've never tried, it just seemed like it would work. But really good tutorial! Very helpful.
 
L

Lordbevan

Guest
I think a easy way is to have 2 heros:
One is hidden when the other is activated.
 
C

Cards

Guest
Only problem with having 2 heroes is that 1 would level up and the other wouldn't. Unless you had a trigger in there somewhere that leveled the inactive hero every time the active one leveled.

But good job on the hero morpher, good ideas in there.
 
N

Naruto[Leaf]

Guest
It's all in there lol, Whenever the hero would morph, the variable LvLHero, would set the current heros level. Then when morphed, the new hero will be set to the previous ones level. With Experiance.
 
F

FurryMoogle

Guest
I was looking at your morph trigger and I was wondering, is it possible to edit some of it so that the second hero does not have shared skill level-ups? I want to use it to make a hero with 2 morphs and each of them will have a spellbook with completely different skills so people can customize many ways on one hero.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top