• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

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