HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Advice using "Ability Level Bonus" Upgrade

02-13-2004, 03:54 AM#1
Burne
What I'm trying to do:
Hero can Summon a Pet. Hero can also learn a Critical Strike type skill. I want the Pet to also learn the CS skill as the Hero does.

What I did:
Hero Ability, CS-Hero: 5 levels blah
Unit Ability, CS-Unit: 5 levels blah
same stats text everything, just ones a Hero skill, ones a Unit skill
Upgrade, CS-Upgrade: 4 levels, Ability Level Bonus, Increment 1, Bonus Base 1

Triggers:
Event
A unit Learns a Skill
Con
Learning Hero = MyHero
Learned Hero Skill = CS-Hero
Actions
If (Level of CS-Hero for Learning Hero = 1) then
Enable CS-Unit for Owner of Learning Hero
else
Set research level of CS-Upgrade to Current Level of CS-Upgrade+1

Obviously CS-Unit is disabled at map stat.

The Problem:
When Hero learns lvl 1, all is fine, and the pet gains level 1 of CS-unit. But when Hero learns the later levels the Pet gets nothing. I inserted a text message to make sure that the else was going off, and that the Upgrade is being research (it is). I also checked to make sure it wasn't just a display issue (its not, Pet really only has level 1).

Clearly I'm doing something wrong. Can anybody help me out with this approach. Or suggest another way to get the effect I want.

Thanks
02-13-2004, 04:13 AM#2
Grater
Upgrades combined with abilities added with triggers are really flaky. I tried the exact same thing and couldn't get it to work properly.

The most reliable way is to make a different version of the critical strike ability for each level, stick them in an array, and choose the right one from the array.

I think my testing was mostly done pre 1.14 so it may be possible now using some more creative methods.
02-13-2004, 04:19 AM#3
Burne
Unfortunaly, because the unit recieving the flaky ability is a pet type and will die and be resummoned, the Add Ability method is not exciting, and I understand that multiple Enable/Disable Abilities triggers are also flaky.
02-13-2004, 05:32 PM#4
Burne
For future reference you have to have the unit use the Upgrade for it to work.
<---- Slow!
02-13-2004, 06:33 PM#5
Dragon
Events:
Hero learns an ability

Conditions:
Ability equal to (crit strike ability here) equals true

Actions:
Set CritStrikeGain to CritstrikeGain + 1



Events:
Hero casts a spell

Conditions:
Spell equal to (pet summon spell here)
CritStrikeGain equal to 1

Actions:
Give last created unit ability (unit version of crit strike level 1)


Events:
Hero casts a spell

Conditions:
Spell equal to (pet summon spell here)
CritStrikeGain equal to 2

Actions:
Give last created unit ability (unit version of crit strike level 2)

And so on...

I think this would work, someone try it...