- Joined
- Apr 8, 2005
- Messages
- 8
Can someone tell me what is wrong with this script??? WE got crashed... I'm a newbie in JASS (just starting ^^)
Btw, can you explain what to do with the takes and returns... I didnt quite get it...
Code:
function Trig_Earthquake_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A08W'
endfunction
function Trig_Earthquake_Actions takes nothing returns nothing
local unit dummy
set dummy = CreateNUnitsAtLoc( 1, 'h00A', GetOwningPlayer(GetTriggerUnit()), GetSpellTargetLoc(), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09J', dummy )
call SetUnitAbilityLevelSwapped( 'A09J', dummy, GetUnitAbilityLevelSwapped('A08W', GetTriggerUnit()) )
call UnitApplyTimedLifeBJ (10.00, ‘BTLF’, dummy)
set dummy = null
endfunction
//===========================================================================
function InitTrig_Earthquake takes nothing returns nothing
set gg_trg_Earthquake = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Earthquake, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Earthquake, Condition( function Trig_Earthquake_Conditions ) )
call TriggerAddAction( gg_trg_Earthquake, function Trig_Earthquake_Actions )
endfunction
Btw, can you explain what to do with the takes and returns... I didnt quite get it...