HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Stat saving when evolving to a different hero

11-13-2002, 09:02 AM#1
Guest
that pretty much sums up what i have been tryin to do. i tried other forums but none has seemed to come up with a way the works properly. i'm tryin to create a map where a hero evolves into a different hero but he/she keeps the stats they carry. Like if someone were to use a tome of Agli and gain +2 agli i want that to be able to carry over.
11-13-2002, 10:53 AM#2
Myster Mystery
This is in the wrong forum I believe... And I just looked through the game cache triggers, there isn't an easy way to do it that I know of. You could make an integer variable and keep track of the heroes stats there, and you would need to use one of the WE's that has the triggers to change the stats.
11-13-2002, 07:10 PM#3
DaKaN
Its possible but takes alot of extra coding. The basic idea is you need 3 interger varibles, HeroStrn HeroAgil HeroIntel, (arrays if you need to keep track of more than one hero)

Then make 6 If statements in that a trigger that fires when a item is used. If (item being manipulated) is = to Tome Of Strn +1 Then (Set varible [HeroStrn = HeroStrn +1]), Repeat until you have covered all the tomes. Make a seperate trigger for the +1 to all stats tome that uses a condition instead of a if statement. Then just set all 3 stat varibles to Value +1

If using an array you will need: HeroStrn[Player number of owner of triggering unit] = HeroStrn[Player number of owner of triggering unit] +1

Now when a hero evoles (replaced with another unit) you will just need to use SetHeroStrn Action, which can be found in GoldenUrg's trigger patch. and set it = to HeroStrn[PlayerNumber]. Same with the other 2 stats.
11-14-2002, 09:00 PM#4
Targash
You only need one array and a bit of custom text
You set the asi values in a certain orden and make a funktion like this.
playerNbr*3+0,1,2 if you have an array like the one below.
Player1
[0]Agility
[1]Strength
[2]Intelligense
Player2
[3]Agility
[4]Strength
[5]Intelligense
and so on
So if you want get the Agility value of player1 hero you
0*3+0=0 The agility 0*3+1=1 the strength and so on
Player2 strength would be 1*3+2=4 the strength position