Message Actuator Property: usePropBody

usePropBody
  • gets/sets the body type (Text or Property)

Type: 
  • Boolean

Value:

  • 1 = True = Property
     
  • 0 = False = Text
Note:
  • Sends a message to a Message Sensor(s).
     
  • The message sent will be the value of the selected Property. 
Sample Code


################  Get the property type

# import bge module
import bge

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

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

act = cont.actuators["Add_Health"]

# get the property type
type = act.usePropBody
 
Sample Code


################  Set the property type

# import bge module
import bge

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

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

act = cont.actuators["Add_Health"]

# set the property type to text
act.usePropBody = 0