• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Hero Ability Transfer

Status
Not open for further replies.
Level 6
Joined
May 11, 2010
Messages
237
Hey guys, i'd like to switch my heroes skills, like halfway through the game for the hero's model to change. So when I remove the current hero and create the new one, is there a way to trigger it so that the created hero gains the same abilities and levels in those abilities as the removed hero. He already has the same abilities as the first hero but i'd like to trigger it so that the trigger sees what skills are currently learned and how many points are in each, and then to gives that to the new hero. Or if possible, and a simpler solution, is there a way to change a unit's model via triggers?

Thanks :)
 
Level 6
Joined
May 11, 2010
Messages
237
But will that be permanent? This is a campaign and when I load him in the next map won't he back to his original form?... Although you have a point, could use Demon hunter's shapeshift and then make the duration unlimited.
 
Level 24
Joined
Oct 12, 2008
Messages
1,783
If it bothers you that much you can easily save the ability levels as variables then use them later to set the abilities of the new form.

If you really want to use a transformation, metamorphosis is usually the worse choice. Bear form works much better.
 
Level 6
Joined
May 11, 2010
Messages
237
I could save them, but am I able to save what abilities are learned also? That's the problem, i'm bring in a hero with identical abilities but the player will have to relearn them... But I guess that isnt much of a problem, I just was hopinh for a way around it so that it seemed that the hero changed form.

And as for bear form, I dont want the player to be able to switch back to the original form, metamorphosis can stop that from happening

Thanks for your help though, greatly appreciated :) +rep
 
Level 6
Joined
May 11, 2010
Messages
237
Oh, guess I should've checked before saying that then, never noticed that before despite using it a fair bit. Thank you :)

Edit: Worked perfectly, the icon of the shapeshift even disappeared. You rock :)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I did something, check it out
Just learn what level of ability for your Blood Mage (like Level 3 Flame Strike, Level 2 Banish, Level 1 Siphon Mana (for testing purpose))
Once you're done to test the system, press ESC key
Test map attached
 

Attachments

  • Simple Saving Spell Ability System.w3x
    12.7 KB · Views: 93
Level 37
Joined
Mar 6, 2006
Messages
9,243
Create a custom upgrade based on Chaos.
Copy and paste the unit, change Art - Model filed to new model.
For the original unit, add the custom upgrade to Techtree - Upgrades used.
Create a custom ability based on some Orc race Chaos ability. Any of them will do. Change the new unit type to your custom unit. Set Check Dependencies to false.

Then you can test it with this kind of trigger:
  • Untitled Trigger 015
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Unit - Add Paladin2 (Grom) to Paladin 0010 <gen>
      • Player - Set the current research level of Paladin2 to 1 for Player 1 (Red)
Paladin2 (Grom) is the name of my custom ability, and Paladin2 is the name of my custom upgrade.

All ability levels will remain as they were before the transformation, the unit can't transform back and there will be no ability icon or a buff.
 

Attachments

  • Test.w3x
    200.3 KB · Views: 77
Level 6
Joined
May 11, 2010
Messages
237
Maker and Defskull, both ideas are awesome. But switching bear form to permanent has actually done the exact same thing as that trigger, the icon disappeared and all the spells and current levels remained :) + rep for ideas though, might need them if this backfires somehow.
 
Status
Not open for further replies.
Top