time
time
Note:
time = 0 means it will
live forever.
gets/sets the number of frames the object will live.
Type: integer
Sample
Code
################ Get time
# get controller
controller = GameLogic.getCurrentController()
# get actuator attached to the controller named Spawn
spawn = controller.actuators["Spawn"]
# get life span in frames
lifeSpan = spawn.time
################ Set time
# get controller
controller = GameLogic.getCurrentController()
# get actuator attached to the controller named Spawn
spawn = controller.actuators["Spawn"]
# set life span in frames
spawn.time = 10
|