- Joined
- Oct 17, 2008
- Messages
- 11
Here is what i have compiled so far.
the spell is meant to hit a signal target (finger of death) then for each unit (which is a ward) within range is then supposed to hit the unit for an additional x damage (with lighting effect finger of death) this unit then dies)
help appreciated!
i know this is probable crap but im trying to learn this, sick of clicking in GuI
the spell is meant to hit a signal target (finger of death) then for each unit (which is a ward) within range is then supposed to hit the unit for an additional x damage (with lighting effect finger of death) this unit then dies)
help appreciated!
JASS:
function Trig_Deaths_Light_Actions takes nothing returns nothing
local unit a = GetEventTargetUnit()
local group b = GetUnitsInRangeOfLocAll( 1000, GetUnitLoc(GetSpellTargetUnit()))
local integer c = 0
local location d = GetUnitLoc(GetSpellTargetUnit())
local player f
local unit e
local lightning array g
set f = GetOwningPlayer(GetEventTargetUnit())
loop
set e = FirstOfGroup(b)
exitwhen b == null
if( GetUnitTypeId(e) == 'o001' ) then
call DamageUnit( f, e, 35, true, true, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_LIGHTNING)
call KillUnit (e)
set g[c] AddLightningLoc('AFOD',GetUnitLoc(a),GetUnitLoc(e))
set c = c + 1
// ignore elseif's for now ill fix them based on the first if //
// elseif( GetUnitTypeId(e) == 'o003' ) then //
// call DamageUnit( f, e, 45, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_LIGHTNING) //
// call KillUnit (e) //
// elseif( GetUnitTypeId(e) == 'o002' ) then //
// call DamageUnit( f, e, 55, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_LIGHTNING) //
// call KillUnit (e) //
// elseif( GetUnitTypeId(e) == 'o004' ) then //
// call DamageUnit( f, e, 65, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_LIGHTNING) //
// call KillUnit (e) //
// elseif( GetUnitTypeId(e) == 'o000' ) then //
// call DamageUnit( f, e, 75, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_LIGHTNING) //
// call KillUnit (e) //
endif
call GroupRemoveUnit(b,e)
endloop
// want to add wait time (to let the lighnting effects show)
loop
exitwhen c == 0
call DestroyLightning g[c] // Will not Destroy lighting for some reson, when i tell it to destroy something inside of the loop and its outside it wont work, but i cant but the timer inside the loop any ideas or solutions//
set c = c - 1
endloop
endfunction
//===========================================================================//
function InitTrig_Deaths_Light takes nothing returns nothing
set gg_trg_Deaths_Light = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( gg_trg_Deaths_Light, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddAction( gg_trg_Deaths_Light, function Trig_Deaths_Light_Actions )
endfunction
//==========================================================================//
function Trig_Deaths_Light_Func001A takes nothing returns nothing
endfunction
i know this is probable crap but im trying to learn this, sick of clicking in GuI
Last edited: