volume
volume
gets/sets the CD volume setting.
Type: Float
Range: 0.0 (no sound) to 1.0 (maximum).
Sample
Code
################## Get volume
# get the controller
controller = GameLogic.getCurrentController()
# get the cd actuator attached to the controller named
act
act = controller.actuators["act"]
# get volume
volume = act.volume
################## Set volume
# get the controller
controller = GameLogic.getCurrentController()
# get the cd actuator attached to the controller named
act
act = controller.actuators["act"]
# set volume
act.volume = 0.5
|