change use frame rate option in game at will

Any way to change this on and off at will while in game(when in editor i can check or uncheck a box)but i need this to change in game

do you mean this?


import bge
cont = bge.logic.getCurrentController()
sensor = cont.sensors["MySensor"]
sensor.frequency=10
sensor.usePosPulseMode = False # or True

edit: oh nevermind i read wrong

you don’t usually want to uncap as it can lead to unpredictable behavior

For your elevator logic may be best.

anyway i’ve done a little research and seems you can’t check or uncheck it in game but i found this:
bge.logic.getLogicTicRate()
bge.logic.setLogicTicRate(value)
hope it helps

thanx for the suport but no its not that part f the code
the reason i want to incap is when i uncap is that the animation and the fisixs go toe to toe even if the game is slow motion
i made a camera that go arount the scene before the gameee begins in order to load the whole leve and during gameplay not have lag
it works but this camera needs to run 4 to 5 times in order to load the whole levele simply becose the first time the game lags and after that the camera is in a far away spot missing things so it needs to run again in mmy laptop for example 4 times is good but i could uncheck this box run the load camera it willl take ass mutch time as it needs in the first run and the check it back in to run the actual gameplay becouse now i dont know how many rounds the load camera neeeds to run in order to load and that depend from pc to pc.i know thats an unorthodox way to load a level but i canot think anythink else to load the level any python script or something.