HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Giving an Ability when learned a skill

12-30-2003, 10:12 PM#1
Omega_Destroyer
Ok, i have created a Skill that has 4 levels. And at each level i want to give the hero a life stealing attack depending on the lv of the ability. How do i go about triggering this?
12-30-2003, 11:21 PM#2
Grater
Well the most obvious way is to use vamparic aura and just set it to have no area of effect, but if you want to stack with vamparic aura heres how:

You need to use the lifesteal item ability, whats more because item abilities dont turn into Hero abilities very well you need to make 4 different versions of Item Life Steal and add them to an array of abilities.
Code:
Lifesteal Init
    Events
        Map initialization
    Conditions
    Actions
        Set LifestealAbilities[1] = Life Steal 15 
        Set LifestealAbilities[2] = Life Steal 30
        ...
When a hero learns the life steal abilitity (which will be a dummy ability based on crit strike or something) first remove any possible existing life steal abilities and then add the ability at the required level.
Code:
Lifesteal Learned
    Events
        Unit - A unit Learns a skill
    Conditions
        (Learned Hero Skill) Equal to Lifesteal
    Actions
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                Unit - Remove LifestealAbilities[(Integer A)] from (Learning Hero)
        Unit - Add LifestealAbilities[(Level of Lifesteal for (Learning Hero))] to (Learning Hero)

This is the way to turn any iconless item abilities into a multi level hero ability.
01-01-2004, 10:54 AM#3
Peacerich
the ability for vampiric potion with 0 duration (unlimited), made into hero skill?

cant understand why u wanna use triggers for it