HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

The events of Orb of Lightning ability

10-08-2004, 06:34 AM#1
Hadeniaz
everyone should make one of the percentage abilities. by using the Orb of Lightning spell.

I've tried this also, but somehow the trigget couldn't get any events of the ability

I tried like


function Trig_Untitled_Trigger_001_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A018' ) ) then
return false
endif
return true
endfunction

function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
local unit caster
local unit target
local unit helper
local integer array abil

set abil[1] ='A014'
set abil[2] ='A013'
set abil[3] ='A015'
set abil[4] ='A016'
set abil[5] ='A017'

set caster = GetSpellAbilityUnit()
set target = GetSpellTargetUnit()
call CreateNUnitsAtLoc( 1, 'u004', GetOwningPlayer(caster), GetUnitLoc(caster), bj_UNIT_FACING )
set helper = GetLastCreatedUnit()
call UnitAddAbilityBJ( abil[GetUnitAbilityLevelSwapped('A012', caster)], helper )
call ShowUnitHide( helper )
call IssueTargetOrderBJ( helper, "unholyfrenzy", caster )
call PolledWait(1)
call RemoveUnit( helper )
endfunction

//===========================================================================
function InitTrig_Enraged takes nothing returns nothing
set gg_trg_Enraged = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enraged, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Enraged, Condition( function Trig_Untitled_Trigger_001_Conditions ) )
call TriggerAddAction( gg_trg_Enraged, function Trig_Untitled_Trigger_001_Actions )
endfunction

well, just like this

as a trigget should sounds like this

a unit being cast an ability

ability being cast is (something)

set variables, make a hidden unit, and order the unit to cast unholy frenzy which depends on the caster's spell level.

the trigger doesn't any problem, however

none of the events could get the orb of lightning's events

no being cast ability
no finishes cast ability
no channeling
not even issued order to points or target

so, I wonder to ask you guys

does anyone know how do we get the events of orb of lightning ability?
10-08-2004, 07:19 AM#2
Dead-Inside
Nope, passive ability. Only way is to simulate the whole ability from the start with triggers.