HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Metamorphed hero questions

06-26-2006, 03:33 PM#1
darkwulfv
How would I...

1. Give a metamorphed hero a new ability set (I think this can be done just by looking in the object editor)
2. Save the levels of the old abilities (from the normal hero)
3. Make the metamorphed hero the same level as the original hero (I think this is already done, not sure though)
4. Give the metamorphed hero ability points = level of hero, so as to learn the new abilities with
5. Save the levels of the metamorphed hero abilities until next casting.

So confusion is not raised, the hero can be owned by multiple players (as in, this is a modified melee map, anyone with the race of this hero may have this hero). I mention this because using variables could cause problems, as they could overwrite each other if another player had this hero. I'm going to work on this myself some, but alot of this I'm not sure how to do.
06-26-2006, 03:40 PM#2
Panto
There's no easy way to save abilities over. You'll have to store them as global variables or in the gamecache. You can make a variable array indexed by player number to track the variable for each player's hero.

A method that I used that made the process a little easier is using a dummy ability to learn the skill. This dummy has no icon except in the learning menu, and it contains the information for the ability in both forms. Then, whenever an ability is learned, whenever the unit morphs, or whenever it's resurrected, I run through each ability and add an actual ability by trigger based on what level of the dummy ability the hero has.