HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Function for Hero Stats?

09-02-2002, 06:51 PM#1
gurubvin
I'm trying to make a map where the player can control adjustments to hero stats(i.e. str, agi, int) when he levels up. After about 3 hrs I got the algorithm to work perfectly, except to my horror, I saw that blizzard had no function which would refer to Hero stats. Basically I wanted to use goldenurg's trigger:
SetStrength(Unit,value,permanent);
for value I needed something that would in logic do this:
Strength= currentstrength + 3;
Help pls. I hope that made sense. thank you.
09-02-2002, 10:59 PM#2
Ari
I feel your chagrin :)
It seems like every three hours or so I bhump into somethign that's simply not directly possible in the silly WE. Luckily, as in this case, there's a workaround. Well, maybe. It depends on exactly what you're doing, I suppose. When the hero is created, use three variables, one for each stat (or possibly an array depending on how many heros you plan on having in play at one time), and set them to the base stats of the hero (since this is a constant). Every time the stat changes in game (at level up, for example, or when a tome is used) adjust the corresponding variable accordingly (since you can detect tome usage and since heros gains stats at predictable rates on level-up). When it comes time for you to manually adjust strength by 1 , for example, set [hero strength] to [hero_strength_variable +1]. I haven't actually played around with hero stats yet, but in theory this should do the trick. Hope this helps.
09-03-2002, 02:50 AM#3
gurubvin
Thanks. that helps alot. I was hoping I wouldn't have to use another array, but oh well. You workin on ne thing right now? Just curious.
09-03-2002, 03:16 AM#4
Ari
I'm working on a final fantasy tactics-based map. It's working it's way to a playable alpha right now. I just made a post about it in the retail map downloads forum.
09-04-2002, 12:23 AM#5
gurubvin
Haha.... I posted a reply on your thread. The ff Tactics one. Ironic. I got some ideas u might be able to use, and I could use some help with the map I'm doin right now. I'd give u my e mail but i check this site more than my email. just reply to this.