UPS just forgot to add "if"
DELETE PLEASE
Heyya I coppied and edited fan of knives
and have a code with it to use
function Trig_Death_Cry_Actions
takes nothing returns nothinglocal 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 =
nullendfunction//===========================================================================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