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 :)
 
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.
 
I think a easy way is to have 2 heros:
One is hidden when the other is activated.
 
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.
 
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.
 
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 The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      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