Is it fatal if I have some functions that may cause desyncing?
In DotA (f.ex) - when your hero revives, your camera is paned to the fountain. In theory that should cause a desync between the players, but it doesn't seem to do that in DotA..
I really want to make a 'local' camera movement, but I don't dare to due to the possible desyncing.
And well I have ONE trigger, that's using a trigger sleep action.
Having one trigger with trigger sleep action isn't so bad, is it?
(I kind a couldn't avoid this, without using global variables + indexing for the weather effect, but then I could've just done the whole thing by indexing and global variables, and I didn't want that)
And what is desyncing (exactly) doing?
Does it cause lag for a brief period, or is it building up with time?
In DotA (f.ex) - when your hero revives, your camera is paned to the fountain. In theory that should cause a desync between the players, but it doesn't seem to do that in DotA..
I really want to make a 'local' camera movement, but I don't dare to due to the possible desyncing.
And well I have ONE trigger, that's using a trigger sleep action.
JASS:
function Trig_Call_Storm takes nothing returns nothing
local unit c = GetTriggerUnit()
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local weathereffect rain
local weathereffect wind
local timer t = GetFreeTimer()
local integer id = GetHandleId(t)
local unit d = CreateUnit(GetOwningPlayer(c),'h00C',x,y,0.00)
local integer lvl = GetUnitAbilityLevel(c,'A019')
local real spell_radius = 325.00+(25.00*I2R(lvl))
if udg_Temp_Region == null then
set udg_Temp_Region = Rect(x-spell_radius, y-spell_radius, x+spell_radius, y+spell_radius)
else
call SetRect(udg_Temp_Region,x-spell_radius, y-spell_radius, x+spell_radius, y+spell_radius)
endif
call UnitAddAbility(d, 'A01A')
set rain = AddWeatherEffect( udg_Temp_Region , 'RAhr' )
set wind = AddWeatherEffect( udg_Temp_Region , 'WNcw' )
call EnableWeatherEffect( rain , true )
call EnableWeatherEffect( wind , true )
call SaveInteger(udg_Table, id, 'maxh' , 6+lvl)
call SaveInteger(udg_Table, id, 'used' , 1)
call SaveReal(udg_Table, id, 'tarx' , x)
call SaveReal(udg_Table, id, 'tary' , y)
call SaveUnitHandle(udg_Table, id, 'dumy' , d)
call SaveReal(udg_Table, id, 'rang' , spell_radius)
call SaveInteger(udg_Table, id, 'levl' , lvl)
call TimerStart( t, 1.10 - (lvl*0.1), true, function StormEffect)
set t = null
/////////////////////////////////////////////////////////////////
call TriggerSleepAction((1.10 - (lvl*0.10))*(7+lvl))
/////////////////////////////////////////////////////////////////
call UnitApplyTimedLife(d, 'BTLF', 0.01)
call EnableWeatherEffect( rain , false )
call EnableWeatherEffect( wind , false )
call RemoveWeatherEffect( rain )
call RemoveWeatherEffect( wind )
set c = null
set d = null
set wind = null
set rain = null
endfunction
(I kind a couldn't avoid this, without using global variables + indexing for the weather effect, but then I could've just done the whole thing by indexing and global variables, and I didn't want that)
And what is desyncing (exactly) doing?
Does it cause lag for a brief period, or is it building up with time?