Module GameTypes :: Class KX_StateActuator
[frames] | no frames]

Class KX_StateActuator

PyObjectPlus --+            
               |            
          CValue --+        
                   |        
     SCA_ILogicBrick --+    
                       |    
           SCA_IActuator --+
                           |
                          KX_StateActuator

State actuator changes the state mask of parent object.

Property:

Instance Methods
 
setOperation(op)
Set the type of bit operation to be applied on object state mask.
 
setMask(mask)
Set the value that defines the bits that will be modified by the operation.
bool
isA(game_type)
Check if this is a type or a subtype game_type. (Inherited from GameTypes.PyObjectPlus)
    Deprecated
integer
getExecutePriority()
Gets the execution priority of this logic brick. (Inherited from GameTypes.SCA_ILogicBrick)
string
getName()
Returns the name of the CValue. (Inherited from GameTypes.CValue)
KX_GameObject
getOwner()
Gets the game object associated with this logic brick. (Inherited from GameTypes.SCA_ILogicBrick)
 
setExecutePriority(priority)
Sets the priority of this logic brick. (Inherited from GameTypes.SCA_ILogicBrick)
Instance Variables
int executePriority
This determines the order controllers are evaluated, and actuators are activated (lower priority is executed first). (Inherited from GameTypes.SCA_ILogicBrick)
bool invalid
Test if the object has been freed by the game engine and is no longer valid. (Inherited from GameTypes.PyObjectPlus)
integer mask
value that defines the bits that will be modified by the operation.
string name
The name of this CValue derived object (read-only). (Inherited from GameTypes.SCA_ILogicBrick)
integer operation
type of bit operation to be applied on object state mask.
KX_GameObject or None in exceptional cases. owner
The game object this logic brick is attached to (read-only). (Inherited from GameTypes.SCA_ILogicBrick)
Method Details

setOperation(op)

 

Set the type of bit operation to be applied on object state mask. Use setMask() to specify the bits that will be modified.

Parameters:
  • op (integer) - bit operation (0=Copy, 1=Add, 2=Substract, 3=Invert)

Deprecated: Use the operation attribute instead.

setMask(mask)

 

Set the value that defines the bits that will be modified by the operation. The bits that are 1 in the value will be updated in the object state, the bits that are 0 are will be left unmodified expect for the Copy operation which copies the value to the object state.

Parameters:
  • mask (integer) - bits that will be modified

Deprecated: Use the mask attribute instead.


Instance Variable Details

mask

value that defines the bits that will be modified by the operation. The bits that are 1 in the mask will be updated in the object state, the bits that are 0 are will be left unmodified expect for the Copy operation which copies the mask to the object state
Type:
integer

operation

type of bit operation to be applied on object state mask. You can use one of the following constant:
  • KX_STATE_OP_CPY (0) : Copy state mask
  • KX_STATE_OP_SET (1) : Add bits to state mask
  • KX_STATE_OP_CLR (2) : Substract bits to state mask
  • KX_STATE_OP_NEG (3) : Invert bits to state mask
Type:
integer