dynamically change i_timescale cvar [Zscript]
Posted: Tue Dec 12, 2017 3:58 am
Hello, in new gzdoom added i_timescale cvar. I try change this cvar dynamically but cvar always reset to 1.
In player tick
Super.tick()
If (CountInv("TestItem")) Cvar.GetCvar("i_timescale").SetFloat(0.5)
else Cvar.GetCvar("i_timescale").SetFloat(1.0)
If change code to
Super.tick()
Cvar.GetCvar("i_timescale").SetFloat(0.5)
All works fine
In player tick
Super.tick()
If (CountInv("TestItem")) Cvar.GetCvar("i_timescale").SetFloat(0.5)
else Cvar.GetCvar("i_timescale").SetFloat(1.0)
If change code to
Super.tick()
Cvar.GetCvar("i_timescale").SetFloat(0.5)
All works fine