Monovertex
Formerly Smith_S9
- Reaction score
- 1,461
Ummm...the Handle Vars can't store a group? If they can't, CSCache can?
function H2I takes handle h returns integer
return h
return 0
endfunction
// ===========================
function LocalVars takes nothing returns gamecache
return InitGameCache("jasslocalvars.w3v")
endfunction
function SetHandleHandle takes handle subject, string name, handle value returns nothing
if value==null then
call FlushStoredInteger(LocalVars(),I2S(H2I(subject)),name)
else
call StoreInteger(LocalVars(), I2S(H2I(subject)), name, H2I(value))
endif
endfunction
function SetHandleInt takes handle subject, string name, integer value returns nothing
if value==0 then
call FlushStoredInteger(LocalVars(),I2S(H2I(subject)),name)
else
call StoreInteger(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction
function SetHandleReal takes handle subject, string name, real value returns nothing
if value==0 then
call FlushStoredReal(LocalVars(), I2S(H2I(subject)), name)
else
call StoreReal(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction
function SetHandleString takes handle subject, string name, string value returns nothing
if value==null then
call FlushStoredString(LocalVars(), I2S(H2I(subject)), name)
else
call StoreString(LocalVars(), I2S(H2I(subject)), name, value)
endif
endfunction
function GetHandleHandle takes handle subject, string name returns handle
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleInt takes handle subject, string name returns integer
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleReal takes handle subject, string name returns real
return GetStoredReal(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleString takes handle subject, string name returns string
return GetStoredString(LocalVars(), I2S(H2I(subject)), name)
endfunction
function GetHandleUnit takes handle subject, string name returns unit
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleTimer takes handle subject, string name returns timer
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleTrigger takes handle subject, string name returns trigger
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function GetHandleEffect takes handle subject, string name returns effect
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function FlushHandleLocals takes handle subject returns nothing
call FlushStoredMission(LocalVars(), I2S(H2I(subject)) )
endfunction
function GetHandleGroup takes handle subject, string name returns group
return GetStoredInteger(LocalVars(), I2S(H2I(subject)), name)
return null
endfunction
function Death_Passage_Move takes nothing returns nothing
local group g1 = GetHandleGroup(GetTriggeringTrigger(), "g1")
local group g2 = CreateGroup()
local unit var1
local real x = GetHandleReal(GetTriggeringTrigger(), "x")
local real y = GetHandleReal(GetTriggeringTrigger(), "y")
local real angle
local real distance
call DisplayTextToForce( GetPlayersAll(), "works" )
call GroupAddGroup(g1, g2)
loop
call DisplayTextToForce( GetPlayersAll(), "works34252352345" )
set var1 = FirstOfGroup(g2)
exitwhen var1 == null
call KillUnit(var1)
set distance = DistanceBetweenPoints(Location(x, y), GetUnitLoc(var1)) + 1000.00
set angle = AngleBetweenPoints(Location(x, y), GetUnitLoc(var1))+1.00
call SetUnitPositionLoc(var1, PolarProjectionBJ(Location(x, y), distance, angle))
call GroupRemoveUnit(g2, var1)
endloop
endfunction
function Death_Passage_Actions takes nothing returns nothing
local unit cast = GetTriggerUnit()
local real x = GetLocationX(GetSpellTargetLoc())
local real y = GetLocationY(GetSpellTargetLoc())
local unit var1
local group g1 = CreateGroup()
local timer t = CreateTimer()
local integer p = 0
loop
exitwhen p == 6
set var1 = CreateUnit(GetOwningPlayer(cast), Death_Passage_Dark_Ball(), x, y, 0.00)
call SetUnitFlyHeight(var1, 30.00, 20.00)
set p = p + 1
endloop
call SetHandleHandle(t, "g1", g1)
call SetHandleReal(t, "x", x)
call SetHandleReal(t, "y", y)
call TimerStart(t, 0.01, true, function Death_Passage_Move)
endfunction
SFilip said:well you should be using official kattana's system...the one he updated.
http://www.wc3jass.com/viewtopic.php?t=224
anyway a quick guess by looking at your code: it seems that you attach the variables to the timer, but then try to read it from GetTriggeringTrigger. try changing that to GetExpiredTimer.