time
time
gets/sets the maximum number of frames for the constraint to
be active.
Type: integer
Note:
0 = forever
Sample Code
#################### Get time
# get the controller
controller = GameLogic.getCurrentController()
# get the constraint actuator attached to the
controller named act
act = controller.actuators["act"]
# get the max activation time
maxTime = act.time
#################### Set time
# get the controller
controller = GameLogic.getCurrentController()
# get the constraint actuator attached to the
controller named act
act = controller.actuators["act"]
# set the max activation time
act.time = 45
|