• 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] Don't Work (Effect trigger)

Status
Not open for further replies.
Level 12
Joined
Mar 23, 2008
Messages
942
JASS:
function Trig_Rasengan_Effect_Actions takes nothing returns nothing
    local unit u = udg_tempunit[1]
    call AddSpecialEffectTargetUnitBJ( "chest", u, "Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl" )
    call TriggerSleepAction( 1.70 )
    call DestroyEffectBJ( GetLastCreatedEffectBJ() )
endfunction

//===========================================================================
function InitTrig_Rasengan_Effect takes nothing returns nothing
    set gg_trg_Rasengan_Effect = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Rasengan_Effect, function Trig_Rasengan_Effect_Actions )
endfunction

Yes, its just a normal GUI trigger converted to use local variables xD
But after 1.7s the effect don't vanish.
 
Level 3
Joined
Jul 24, 2007
Messages
40
yo bro try this
JASS:
function Trig_Rasengan_Effect_Actions takes nothing returns nothing
    local unit u = udg_tempunit[1]
    local effect e
    set e = AddSpecialEffectTarget("Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl",u, "chest")
    call TriggerSleepAction( 1.70 )
    call DestroyEffect( e )
endfunction

//===========================================================================
function InitTrig_Rasengan_Effect takes nothing returns nothing
    set gg_trg_Rasengan_Effect = CreateTrigger( )
    call TriggerAddAction( gg_trg_Rasengan_Effect, function Trig_Rasengan_Effect_Actions )
endfunction
 
Level 11
Joined
Apr 6, 2008
Messages
760
JASS:
function Trig_Rasengan_Effect_Actions takes nothing returns nothing
    local unit u = udg_tempunit[1]
    local effect e
    set e = AddSpecialEffectTarget("Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl",u, "chest")
    call TriggerSleepAction( 1.70 )
    call DestroyEffect( e )
    set e = null
endfunction

//===========================================================================
function InitTrig_Rasengan_Effect takes nothing returns nothing
    set gg_trg_Rasengan_Effect = CreateTrigger( )
    call TriggerAddAction( gg_trg_Rasengan_Effect, function Trig_Rasengan_Effect_Actions )
endfunction

else u have a leak :)
 
Status
Not open for further replies.
Top