Need help serius

Status
Not open for further replies.
Level 19
Joined
Aug 24, 2007
Messages
2,885
UPS just forgot to add "if"
DELETE PLEASE

Heyya I coppied and edited fan of knives
and have a code with it to use
JASS:
function Trig_Death_Cry_Actions takes nothing returns nothing
local unit caster
local real x
local real y
set x = GetUnitX(GetTriggerUnit())
set y = GetUnitY(GetTriggerUnit())
set caster = CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()),'h00C',Location(x,y),bj_UNIT_FACING)
call SetUnitAbilityLevel(caster,'A00U',GetUnitAbilityLevel(GetTriggerUnit(),'A00W'))
call IssueImmediateOrderBJ(caster,"fanofknives")
call UnitApplyTimedLife(caster,'BTLF',2)
set caster = null
endfunction

//===========================================================================
function InitTrig_Death_Cry takes nothing returns nothing
    set gg_trg_Death_Cry = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Death_Cry, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddAction( gg_trg_Death_Cry, function Trig_Death_Cry_Actions )
endfunction
Anyway It shuts the game with no errors when I cast the spell h00C is a dummy spell caster btw and A00U is ability to cast by dummy caster (its fan of knives based too) and A00W is ability that hero casts
 
Status
Not open for further replies.
Back
Top