- Joined
- Sep 9, 2007
- Messages
- 6,759
JASS:
function Trig_Press_Esc_Actions takes nothing returns nothing
local location Tmp_Loc
local location Tmp_Loc2
local unit Tmp_Unit
local unit Tmp_Unit2
local unit Tmp_Unit3
local effect Tmp_Effect
local effect array Tmp_Effect_Array
local integer Tmp_Integer
local integer LoopStart1
local integer LoopEnd1
local integer LoopStart2
local integer LoopEnd2
local real Tmp_Real
local real Tmp_Real2
set Tmp_Unit = GetTriggerUnit()
set Tmp_Loc = GetUnitLoc(Tmp_Unit)
set Tmp_Unit2 = CreateUnitAtLoc(GetOwningPlayer(Tmp_Unit),'bomb', Tmp_Loc, 0.00 )
set Tmp_Unit3 = Tmp_Unit2
call RemoveLocation(Tmp_Loc)
call TriggerSleepAction(3.00)
set Tmp_Loc = GetUnitLoc(Tmp_Unit3)
set Tmp_Effect = AddSpecialEffectLoc("Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",Tmp_Loc)
call RemoveLocation(Tmp_Loc)
call DestroyEffect(Tmp_Effect)
set Tmp_Loc = GetUnitLoc(Tmp_Unit3)
set Tmp_Effect = AddSpecialEffectLoc("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",Tmp_Loc)
call RemoveLocation(Tmp_Loc)
set LoopStart2 = 0
set LoopEnd2 = 1
set Tmp_Loc = GetUnitLoc(Tmp_Unit3)
loop
exitwhen(LoopStart2>LoopEnd2)
set LoopStart1 = 0
set LoopEnd1 = 3
set Tmp_Real2 = LoopStart2 * 128.00
loop
exitwhen(LoopStart1>LoopEnd1)
set Tmp_Integer = Tmp_Integer + 1
set Tmp_Real = LoopStart1 * 90.00
set Tmp_Loc2 = PolarProjectionBJ(Tmp_Loc,Tmp_Real2,Tmp_Real)
set Tmp_Effect_Array[Tmp_Integer] = AddSpecialEffectLoc("Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl",Tmp_Loc2)
call RemoveLocation(Tmp_Loc2)
//call DestroyEffect(Tmp_Effect_Array[Tmp_Integer])
set LoopStart1 = LoopStart1 + 1
endloop
set LoopStart2 = LoopStart2 + 1
endloop
call RemoveLocation(Tmp_Loc)
call RemoveUnit(Tmp_Unit3)
call TriggerSleepAction(3.00)
call DestroyEffect(Tmp_Effect)
set Tmp_Unit3 = null
set Tmp_Unit2 = null
set Tmp_Unit = null
endfunction
//===========================================================================
function InitTrig_Press_Esc takes nothing returns nothing
set gg_trg_Press_Esc = CreateTrigger( )
call TriggerAddAction( gg_trg_Press_Esc, function Trig_Press_Esc_Actions )
endfunction
Add to gg_trg_Press_Esc the Event: A unit starts using an ability
This does work, but the loop will never take place and the unit will not be removed.