Script::ScriptProcess

Started by KAKAN, Apr 02, 2017, 09:40 AM

Previous topic - Next topic

KAKAN

If I'm correct, ScriptProcess should be called 1 time in each ms. But its not.
Its getting called 100 times around every 2 secs.
I want to know how many times it gets called in one sec. I can't use time() since its not present in the client side( dunno why though, its a offcial squirrel function iirc )
oh no

.

ScriptProcess is called after each frame is completed. therefore, the number of calls may vary depending on the frame-rate of the client on which is running.

If your game runs at 1000 fps then yes, it will be called once every 1ms.
.

ysc3839

You can use Script.GetTicks()

KAKAN

Quote from: ysc3839 on Apr 02, 2017, 11:32 AMYou can use Script.GetTicks()
Thanks. That will help :)

Quote from: happymint on Apr 02, 2017, 10:14 AMScriptProcess is called after each frame is completed. therefore, the number of calls may vary depending on the frame-rate of the client on which is running.

If your game runs at 1000 fps then yes, it will be called once every 1ms.
Ty as well, I didn't know that.
oh no