• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Active AND Passive Abilities

Status
Not open for further replies.
Level 4
Joined
Feb 25, 2008
Messages
58
For instance, when I hit level 6 and get to learn my ultra-powerful ultimate ability, I want it to give me the ability to fire a gigantic fireball that does >9000 damage but ALSO I want the same ability to give me a passive +200 mana.

This is where I get stuck. I've got the fireball, I've got the +200 mana. The problem is when I have more than 1 level of the ability. How do I make it so that when a hero increases the level of a skill (not learns it, that only works the first time) that he gets 200 more mana? I tried spellbooks but they dont exactly work... help?
 
Level 4
Joined
Apr 20, 2009
Messages
106
I just tested it, and the Learns a Skill event not only fires when the first skill point is put into an ability, but also for more points put into that same ability. That being said, the way I see you potentially solving your problem is this:

(I would have a variable to store the level of the spell (real or integer, I'm not sure), just to make it easier and less clicking)...(excuse me for no trigger tags, I'm just rolling with this)

When the hero learns a skill, you're going to want to save the level of the ultimate to your variable. Then, you will do a number of if-thens. If the variable is 1, add the 200 mana. If the variable is 2, remove the 200 mana ability, and then add a 400 mana ability. If it's 3, remove the 400 and add a 600. I think this is the fastest way to do it, but I will try something else real quick.

I've tried to make the Mana Gain a hero ability, with each level of it adding 200 more mana, however it seems that only the first level actually adds any mana, despite what I specify in the object data. I'll keep playing with it, but I doubt I'll get it to work.
 
Level 4
Joined
Feb 25, 2008
Messages
58
Thanks for the help Quiraji, but I actually just found an easier way! For those interested: use upgrades and just increase the level of research for the player when they "learn" the skill.
 
Level 4
Joined
Apr 20, 2009
Messages
106
Interesting ideas, but I have to ask, what happens if a hero unlearns the ability? Well, I guess the simplest way would be to not offer the ability of unlearning anything lol, but yeah...

Also, I tried that multiple ways, M4stah, but for some reason, only the first level actually does anything.

Good job on figuring it out, though.
 
Level 4
Joined
Feb 25, 2008
Messages
58
Heh thanks guys. And I think I remember reading somewhere that item abilities such as movement speed, attack speed, mana, etc, can't be "leveled up" which is weird but whatever.
 
Status
Not open for further replies.
Top