- Joined
- Dec 14, 2007
- Messages
- 41
JASS:
function Trig_Lockon_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A002' ) ) then
return false
endif
return true
endfunction
function Trig_Lockon_Actions takes nothing returns nothing
call AttachObject(GetSpellTargetUnit(),"target",GetSpellAbilityUnit())
call TriggerSleepAction(3.00)
if UnitHasBuffBJ(GetSpellTargetUnit(),'B000' ) == true then
call DisplayTimedTextToPlayer(GetOwningPlayer(GetSpellAbilityUnit()),GetUnitX(GetSpellTargetUnit()),GetUnitY(GetSpellTargetUnit()),5.00,"Lock On Complete!")
call UnitAddAbility(GetSpellAbilityUnit(),'A003')
call AttachBoolean(GetSpellTargetUnit(),"lockbreakable",false)
else
call DisplayTimedTextToPlayer(GetOwningPlayer(GetSpellAbilityUnit()),GetUnitX(GetSpellAbilityUnit()),GetUnitY(GetSpellAbilityUnit()),5.00,"Lock Lost")
endif
endfunction
//===========================================================================
function InitTrig_Lockon takes nothing returns nothing
set gg_trg_Lockon = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Lockon, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Lockon, Condition( function Trig_Lockon_Conditions ) )
call TriggerAddAction( gg_trg_Lockon, function Trig_Lockon_Actions )
endfunction
nothing happens,all the IDS are correct. no errors when i save.but ingame nothing happens?