Warcraft III resources & community, 2003–2006 · archived

Help destroying lightning effects

4 posts
#1

Help destroying lightning effects

Allright so im working on a new ability wherein it creates a siphon mana lightning effect between the hero and all nearby enemy land units that have mana. i created the effects just fine using a unit group trigger but im having one big problem: how do i destroy them? I cant set them to an integer because theres no definite number and i tried using Last created lightning effect but that didnt work either. anyways i was wondering if theres any way in jass or something like that to detect all the lightning effects in a region. Thanks for any help! :D
#2
/bump
come on guys i really need some help!!
#3
allright...i hope u understand JASS




function Condition takes nothing returns boolean

//your condition here

endfunction

function TheUnitGroup takes unit u returns nothing

local location l = GetUnitLoc( u )

local location l2 = GetUnitLoc( udg_caster )

local lightning li

call AddLightningLoc( from l to 12 using "mdl" ) ill let u write that

set li = GetLastCreatedLightning()

// put a wait until the unit stops casting the ability or whatever stops it

call DestroyLightning( l )

endfunction

function TheOrigUnitGroup takes nothing returns nothing

call ExecuteFunc( "TheUnitGroup" ) // also give it the Picked Unit, the code is GetEnumUnit()

endfunction

function action takes nothing returns nothing

//functions

call ForGroup( group g, function TheOrigUnitGroup )

//more functions

endfunction

function InitTrig_MyTrig takes nothing returns nothing

//do stuff here

endfunction



i hope this is what youu wanted
#4
im still learning jass so ill study this and do some reasearch until i get it. thanks!