How can I change game settings during or after scenes? (UPBGE)

Ok so my issue is that after completing a game the “set scene” node is initiated, which changes to a scene with a cutscene playing. The problem is that the cutscene video (via image texture) plays at twice the speed that I would want. For context, my game is playing at 60fps and plays the 30fps video at twice the speed. This is strange as if I press ‘p’ and launch this from the scene with the cutscene it plays at its normal speed (despite the frame rate showing 60fps). I’ve noticed the issue is that the animation speed in scene 1 (game) is carried on to scene 2 (cutscene), even if the game settings on scene 2 are different. One solution I found is that if I set the “Time Scale” on game physics to 0.5 (on scene 1 - game) then the cutscene speed (scene 2) is normal, however this would halve my game speed.

So I guess my question would be - is there a way to change Time Scale or Frame Rate during the game via a python script? (so I could activate this before the cutscene starts). Thanks. Alternative solutions are also welcome.

You can use:

bge.logic.setTimeScale(float)

As @BlenderTimer mentioned, you can use bge.logic.setTimeScale(). However, if you want to apply different time scale values per scene, you will need to make a small check condition as well:

import bge

def main(self):
    
    if self.owner.scene.name == "Scene1":
        bge.logic.setTimeScale(1.0)
    elif self.owner.scene.name == "Scene2":
        bge.logic.setTimeScale(0.5)