Script::ScriptProcess
[Release] Developer Panel »

KAKAN

  • Wiki Contributor
  • Posts: 3,343
Script::ScriptProcess
« on April 2nd, 2017, 10:40 AM »
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 )
You can contact me using Discord, at Developers.CPP( check off-board to find the invite link )
Github: https://github.com/theKAKAN

.

  • VC:MP Beta Tester
  • .
  • Posts: 1,804
Re: Script::ScriptProcess
« Reply #1, on April 2nd, 2017, 11:14 AM »
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

  • VC:MP Beta Tester
  • Posts: 620

KAKAN

  • Wiki Contributor
  • Posts: 3,343
Re: Script::ScriptProcess
« Reply #3, on April 2nd, 2017, 01:20 PM »
Quote from ysc3839 on April 2nd, 2017, 12:32 PM
You can use Script.GetTicks()
Thanks. That will help :)
Quote from happymint on April 2nd, 2017, 11:14 AM
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.
Ty as well, I didn't know that.
You can contact me using Discord, at Developers.CPP( check off-board to find the invite link )
Github: https://github.com/theKAKAN

[Release] Developer Panel »