HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit - Replace Help needed

10-16-2002, 02:46 AM#1
Locotaur
Hi all, I was wondering that if say you had a hero in a map and you boosted it's stats to like 200 each. If you used a unit replace trigger to replace that hero with another hero, would it still have the same stats and level? If it doesn't do you know a way I could get the new hero to have the same stats and level? Thanks!
10-16-2002, 03:15 AM#2
Dinadan87
Level is easy. Store the heroes level into a variable. When the hero is replaced then use the Set Level trigger to change the level to the variable you set. For even better results do the variable thing with EXP instead so they don't lose any progress on making it to the next level. Stats are a pain though as triggers cannot read a hero's stats at all. The only way is to keep track of any stat bonus the hero can possibly get. Have variable set to the starting stat values, and whenever the hero levels up add the correct amount to the variable depending on how much he would gain per level. Also make sure you have it add to the variable any time a tome is used. Then when you switch you can use these variables to get the stats for the new heroes. It's a pain having to tell the triggers to keep track of stat gain, but it's the only way to do it :bgrun: Also make sure you put the items into an array and give them back to the new hero form (unless you don't want to keep items). If there are no tomes and the hero will always change at a certain level, you can specify exact numbers since you will know the numbers after the levels are gained, but since you probably do want tomes you better not do that way...

P.S. Isn't 200 kind of a lot? Sort of make intelligence heroes useless :sweatdrop