- Joined
- Aug 27, 2004
- Messages
- 471
Im working on another spell, and this is the first time i have come into this problem. Most of my handles pass fine with Kattanas handler system. But two of my handles seem to have broken, and are always passing "0". I made some text displays to make sure this was the problem, and it is. I just cant fix it, i have tried changing it to pass an integer and convert it into a real (didint work), setting it after locals were declared rather than during, and a whole ton of other stuff.
But it just wont work, and i cant get why! Every other handle passes fine, the real has a value > 0 when its passed... Why doesnt this work?
Alright, this isisint the whole script, cause it doesnt fit . So try to ingore the missing parts >.>
Calls the problematic function via timer:
The problematic function:
I have tried for four hours to fix this bug, but i just cant seem to get the variable to the other side... Everything else works though... :/.
But it just wont work, and i cant get why! Every other handle passes fine, the real has a value > 0 when its passed... Why doesnt this work?
Alright, this isisint the whole script, cause it doesnt fit . So try to ingore the missing parts >.>
Calls the problematic function via timer:
JASS:
function SkyPortion takes real painful, integer spd, real range, integer maxama, location targpos returns nothing
local effect array Effects
local real array XS
local real array YS
local real array FinWait
local location array HitPoint
local timer array TillFor
local real RanX = 0
local real RanY = 0
local real MaxWait = 1.62
local real MinWait = 1.02
local real TargposX = GetLocationX(targpos)
local real TargposY = GetLocationY(targpos)
local real passX = 0
local real passY = 0
local integer CountA = 0
local integer CountB = 0
local integer CountC = 0
call SetHandleReal(GetTriggeringTrigger(), "painfulness", painful)
loop
exitwhen(CountA >= maxama)
set FinWait[CountA] = (GetRandomReal(MinWait, MaxWait))
set RanX = (GetRandomReal((range / 10), (range)))
set RanY = (GetRandomReal((range / 10), (range)))
set HitPoint[CountA] = Location((TargposX + RanX), (TargposY + RanY))
set Effects[CountA] = AddSpecialEffectLoc("Abilities\\Spells\\Human\\Blizzard\\BlizzardTarget.mdl", HitPoint[CountA])
set TillFor[CountA] = CreateTimer()
set passX = GetLocationX(HitPoint[CountA])
set passY = GetLocationY(HitPoint[CountA])
call SetHandleReal(GetTriggeringTrigger(),"PHX", passX)
call SetHandleReal(GetTriggeringTrigger(),"PHY", passY)
call TimerStart(TillFor[CountA], 0.80, false, function SkyDamagePortion)
call TriggerSleepAction(FinWait[CountA])
set CountA = (CountA + 1)
endloop
endfunction
The problematic function:
JASS:
function SkyDamagePortion takes nothing returns nothing
local timer array FrostTimer
local unit array FOGCalleresto
local integer AmQ = GetHandleInt(GetTriggeringTrigger(), "CurrCount")
local real PointHitX = 0
local real PointHitY = 0
local real Range = GetHandleReal(GetTriggeringTrigger(), "Range")
local real Duration = GetHandleReal(GetTriggeringTrigger(), "Sky_Shard_Frost_Duration")
local real Damage = GetHandleReal(GetTriggeringTrigger(), "Sky_Shard_Damage")
local integer Groupies = 0
local integer CountA = 0
local group Radialian
local location FinLocation
local unit FOG
local unit caster = GetHandleUnit(GetTriggeringTrigger(), "casterunit")
local player owner = GetOwningPlayer(GetHandleUnit(GetTriggeringTrigger(), "casterunit"))
set PointHitX = GetHandleReal(GetTriggeringTrigger(), "PHX")
set PointHitY = GetHandleReal(GetTriggeringTrigger(), "PHY")
set FinLocation = Location(PointHitX, PointHitY)
call DisplayTimedTextToForce( GetPlayersAll(), 30, (R2S(PointHitX) + " " + R2S(PointHitY)))
set Radialian = GetUnitsInRangeOfLocAll(Range, FinLocation)
set Groupies = CountUnitsInGroup(Radialian)
call DisplayTimedTextToForce( GetPlayersAll(), 30, I2S(Groupies))
loop
exitwhen(Groupies <= 0)
set Groupies = CountUnitsInGroup(Radialian)
set FOG = FirstOfGroup(Radialian)
if(IsUnitAliveBJ(FOG) == true) then
if(IsUnitEnemy(FOG, owner) == true) then
call SetUnitLifeBJ(FOG, (GetUnitStateSwap(UNIT_STATE_LIFE, FOG) - Damage))
call SetUnitMoveSpeed(FOG, (GetUnitDefaultMoveSpeed(FOG)) - 100)
set FrostTimer[CountA] = CreateTimer()
set FOGCalleresto[CountA] = FOG
call SetHandleHandle(GetTriggeringTrigger(), "FogCurrent", FOG)
call TimerStart(FrostTimer[CountA], Duration, false, function SkyFinishPortion)
call GroupRemoveUnit(Radialian, FOG)
endif
endif
endloop
endfunction
I have tried for four hours to fix this bug, but i just cant seem to get the variable to the other side... Everything else works though... :/.