- Joined
- Aug 27, 2004
- Messages
- 471
I have completed my second spell, but it wont kill the special effects. It justs leaves them there... Even though i have a destroying function.
Why dont they die???
One function that doesnt remove sfx (Its not the variable passing)
Its so weird... they just stay as if nothing was happening... And i dont get why, its not a variable problem...??? Jass is weird
Why dont they die???
One function that doesnt remove sfx (Its not the variable passing)
JASS:
function SkyFinishPortion takes nothing returns nothing
local effect Morbid82 = GetHandleEffect(GetExpiredTimer(), "FrozenSfx2150")
local unit FOG = GetHandleUnit(GetExpiredTimer(), "FOGCurrent2150")
call SetUnitMoveSpeed(FOG, (GetUnitDefaultMoveSpeed(FOG)))
call DestroyEffect(Morbid82)
set FOG = null
set Morbid82 = null
endfunction
JASS:
function EarthPortion takes real painful, real range, integer maxama, location targpos, unit casterunit returns nothing
local location array TargetPoint
local effect array DestroEff
local integer lvl = GetHandleInt(GetTriggeringTrigger(), "levelism")
local real TargposX = GetLocationX(targpos)
local real TargposY = GetLocationY(targpos)
local real RanX = 0.00
local real RanY = 0.00
local real Twait = 0.00
local real Mawait = (0.80 / I2R(lvl))
local real Miwait = (0.20 / I2R(lvl))
local integer CountA = 0
local unit FOG
local group TotalTargs
local location BlackLoc
local player owner = GetOwningPlayer(casterunit)
set TotalTargs = GetUnitsInRangeOfLocAll(range, targpos)
loop
exitwhen(CountA == maxama)
set RanX = (GetRandomReal((range / 10), (range)))
set RanY = (GetRandomReal((range / 10), (range)))
set TargetPoint[CountA] = Location((RanX + TargposX), (RanY + TargposY))
call AddSpecialEffectLoc("Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathTargetArt.mdl", TargetPoint[CountA])
set DestroEff[CountA] = GetLastCreatedEffectBJ()
set TotalTargs = GetUnitsInRangeOfLocAll(range, TargetPoint[CountA])
set FOG = FirstOfGroup(TotalTargs)
if(IsUnitAliveBJ(FOG) == true) then
if(IsUnitEnemy(FOG, owner) == true) then
call UnitDamageTargetBJ(casterunit, FOG, painful, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL)
endif
endif
set Twait = (GetRandomReal(Miwait, Mawait))
call TriggerSleepAction(Twait)
call DestroyEffectBJ(DestroEff[CountA])
set DestroEff[CountA] = null
set CountA = (CountA + 1)
endloop
endfunction
Its so weird... they just stay as if nothing was happening... And i dont get why, its not a variable problem...??? Jass is weird