| 07-25-2003, 09:12 PM | #1 |
Hello, I wanted to know if there is a way to save the level of a hero spell into a variable so I can use it for Trigger based spells. Regards |
| 07-25-2003, 10:36 PM | #2 |
Here's it in normal text: Events Unit - A unit Learns a skill Conditions (Learned Hero Skill) Equal to Human Archmage - Blizzard Actions Set skill_level = (skill_level + 1) But... you can't use that for a custom skill because you cant specifiy your skill in the conditions. So use this: Code:
function Trig_Skill_Tracker_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'AHbz' ) ) then //Change AHbz to whatever the code of your skill is
return false
endif
return true
endfunction
function Trig_Skill_Tracker_Actions takes nothing returns nothing
set udg_skill_level = ( udg_skill_level + 1 )
endfunction
//===========================================================================
function InitTrig_Skill_Tracker takes nothing returns nothing
set gg_trg_Skill_Tracker = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Skill_Tracker, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Skill_Tracker, Condition( function Trig_Skill_Tracker_Conditions ) )
call TriggerAddAction( gg_trg_Skill_Tracker, function Trig_Skill_Tracker_Actions )
endfunction |
| 07-26-2003, 08:06 AM | #3 | |
Quote:
Thanks a lot but I need to know one more thing: How to get the Code of my Custom spell? (For example AHbz) |
