• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] newbie need help...

Status
Not open for further replies.
Level 3
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 ^^) :(

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...
 
Status
Not open for further replies.
Top