JASS:
scope AddChop initializer Init
globals
private constant unit squire = GetLevelingUnit()
endglobals
private function Conditions takes nothing returns boolean
return GetUnitTypeId(squire) == 'H006' and GetUnitLevel(squire) > 1
endfunction
private function Actions takes nothing returns nothing
call UnitAddAbility( squire, 'A000' )
call DisplayTimedTextToForce( GetForceOfPlayer(GetOwningPlayer(squire)), 30, "New Ability learned! |cffff8040Chop|r" )
endfunction
//===========================================================================
private function Init takes nothing returns nothing
local trigger AddChopTrg = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( AddChopTrg, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( AddChopTrg, Condition( function Conditions ) )
call TriggerAddAction( AddChopTrg, function Actions )
endfunction
endscope
Pretty straight forward script, don't know what is wrong though, all the unit codes are correct.
Need help please. Will add rep