[Help] Spellbook

xAnaMorphine

Active Member
Reaction score
43
After 3 hours of intensive searching and trying in the WE :banghead: , I gave up. :(
Now I want to ask you guys :confused:, if you could answer and tell me how to get a simple Spellbook working <3.

That's how it looks like:

Code:
function Trig_TestSkill2_Conditions takes nothing returns boolean
    if ( not ( GetTriggerUnit() == GetLevelingUnit() ) ) then
        return false
    endif
    if ( not ( GetUnitLevel(GetLevelingUnit()) == 3 ) ) then
        return false
    endif
    return true
endfunction

function Trig_TestSkill2_Actions takes nothing returns nothing
    call UnitAddAbilityBJ( 'AHbz', GetTriggerUnit() )
    call UnitRemoveAbilityBJ( 'AHbz', GetTriggerUnit() )
    call UnitAddAbilityBJ( 'A004', GetTriggerUnit() )
endfunction

//===========================================================================
function InitTrig_TestSkill2 takes nothing returns nothing
    set gg_trg_TestSkill2 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_TestSkill2, EVENT_PLAYER_HERO_LEVEL )
    call TriggerAddCondition( gg_trg_TestSkill2, Condition( function Trig_TestSkill2_Conditions ) )
    call TriggerAddAction( gg_trg_TestSkill2, function Trig_TestSkill2_Actions )
endfunction

It leaks, and I know why, but I don't know how to fix it :O

It attaches the skill to the Hero skill panel but not into the Spellbook, why? :nuts:
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
You cannot add spells that way to a Spell Book.

One way how to do what you want to achieve is to add all the spells to the Spell Book
and disable them all and when reached a certain level, enable the needed spell.
 

xAnaMorphine

Active Member
Reaction score
43
You cannot add spells that way to a Spell Book.

One way how to do what you want to achieve is to add all the spells to the Spell Book
and disable them all and when reached a certain level, enable the needed spell.

Heck yea!

THIS IS THE METHOD I USED BEFORE!

Tell me more, and I eat your babies.

Pl0x explain ^_^
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top