Sound Actuator Loop Bidirectional: cone_volume_outer

cone_volume_outer
  • gets/sets the volume in the outer cone.
     
  • Sound Actuator name:  Cone Outer Gain

Type: 
  • float number

Range:

  • 0.00 to 1.00
Loop Bidirectional:
  • Plays the sound file from start to finish.  Then finish to start.  Over and over.
  • Positive Pulse:  Starts playing the sound file from the beginning.
  • Negative pulse:  Keeps playing the sound file until it reaches the end, then stops playing.
Sample Code


################  get the volume in the outer cone

# import bge module
import bge

# get the controller
cont = bge.logic.getCurrentController()

# get the actuator attached to the controller
# my actuator is named Song

act = cont.actuators["Song"]

# get the volume in the outer cone
vol = act.cone_volume_outer
 
Sample Code


################  set the volume in the outer cone

# import bge module
import bge

# get the controller
cont = bge.logic.getCurrentController()

# get the actuator attached to the controller
# my actuator is named Song

act = cont.actuators["Song"]

# set the volume in the outer cone to 0.5
act.cone_volume_outer = 0.5