Class SCA_PropertyActuator (2.48)


Methods
getProperty setProperty
getValue setValue
 
Variables
---------- ----------
 
Constants
---------- ----------

Inherited Methods:  Class SCA_ILogicBrick
getExecutePriority setExecutePriority
getOwner ----------

Inherited Methods:  Class PyObjectPlus
isA ----------

Inherited Methods:  Class Value
getName ----------



Methods



getProperty

getProperty()

Returns the name of the property the actuator uses.

Return type:  string

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator named act attached to the controller
propAct = controller.getActuator("act")

# get property it uses
prop = propAct.getProperty()

getValue

getValue()

Returns the value (as a string) the actuator applies to the property.

Return type:  string

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator named act attached to the controller
propAct = controller.getActuator("act")

# get value it applies to property as a string
prop = propAct.getValue()

setProperty

setProperty(prop)

Sets (changes) the property the actuator uses.

prop:
Type:  string

Note:
Property must already exist (added using object's Add Property button).
If property doesn't already exist, setProperty will be ignored.

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator named act attached to the controller
propAct = controller.getActuator("act")

# set the property it uses
propAct.setProperty("health")

setValue

setValue(value)

Sets the value the actuator applies to the property.

value:
Type:  string

Sample Code

# get the controller
controller = GameLogic.getCurrentController()

# get the actuator named act attached to the controller
propAct = controller.getActuator("act")

# set the value applied to property
propAct.setValue("-3")



Blender 3D
Game Engine