• 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.

[Trigger] i h8 jass problem importing a spell :S

Status
Not open for further replies.
Level 19
Joined
Feb 15, 2008
Messages
2,184
JASS:
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_cast_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A09K'
endfunction

function Trig_cast_Actions takes nothing returns nothing
local unit u = GetSpellAbilityUnit()
local player P = GetOwningPlayer(u)
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local unit s = CreateUnit(P,'h027',x,y,0)
call IssueTargetOrder(s,"bloodlust",u)
call UnitApplyTimedLife( s, 'BTLF', 3 )
call UnitAddAbility(u,'Apiv')
loop
call PolledWait(0.5)
exitwhen UnitHasBuffBJ(u, 'B01C') == false 
endloop
call UnitRemoveAbility(u,'Apiv')
set P = null
set u = null
set s = null
endfunction

//===========================================================================
function InitTrig_cast_Copy takes nothing returns nothing
    set gg_trg_cast_Copy = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_cast_Copy, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_cast_Copy, Condition( function Trig_cast_Conditions ) )
    call TriggerAddAction( gg_trg_cast_Copy, function Trig_cast_Actions )
endfunction

this trigger get this message

function Trig_cast_Conditions takes nothing returns boolean
 
Last edited:
Level 6
Joined
Sep 13, 2008
Messages
261
I copied the trigger and tested it in a map and I got no error message. The units and spells werent the same so nothing happened, but there was no error message.
 
Status
Not open for further replies.
Top