How might I slow down time for every object in the level of a game, when I press a certain key? I need the effect to turn off after a specified time like 5 to 10 seconds…
I’m trying to test slowing down the speed of the animation on one object currently, but the script I’ve been given makes no sense to me… And I have yet to understand the instructions for using the script.
import bge
controller = bge.logic.getCurrentController()
owner = controller.owner
##User Variables#######
#name of the keyboard sensor (slow)
keyboard = ""
#name of the ipo property actuator
ipo = ""
endframe = 5
startframe = 1
speedfast = 1/15
speedslow = 1/30
###################
slow = controller.sensors[keyboard]
ipo = controller.actuators[ipo]
if not "count" in owner:
owner["count"] = speedfast
owner["frame"] += owner["count"]
if slow.positive:
owner["count"] = speedslow
else:
owner["count"] = speedfast
controller.activate(ipo)