| Class KX_StateActuator (2.48) |
|
|
| getExecutePriority |
setExecutePriority |
| getOwner |
---------- |
|
|
setMask
setMask(group)
Sets the State Mask Group.
State Actuator Operation:
Cpy:
Makes the selected
State Mask group active.
Makes all other State Mask groups inactive.
Add:
Makes the selected
State Mask group active.
Other State Mask groups:
Active groups stay
active.
Inactive groups stay inactive
Sub:
Makes the selected
State Mask group inactive.
Other State Mask groups:
Active groups stay
active.
Inactive groups stay inactive
Inv:
If the Selected
State Mask group is active:
Makes the group
inactive.
If the Selected State Mask group is inactive:
Makes the group
active.
group:
Type: integer
1 = State Mask group
1 active
2 = State Mask group 2 active
3 = State Mask groups 2 and 1active
4 = State Mask group 3 active
5 = State Mask groups 3 and 1 active
6 = State Mask groups 3 and 2 active
7 = State Mask groups 3 and 2 and 1 active
8 = State Mask group 4 active
etc
16 = layer 5
etc
32 = layer 6
etc
Sample
Code
# get the controller
controller = GameLogic.getCurrentController()
# get the actuator attached to the controller named act
act = controller.getActuator("act")
# set the state actuator operation to cpy
act.setOperation(0)
# State Mask group 2 active
act.setMask(2)
# use it
GameLogic.addActiveActuator(act, True)
setOperation
setOperation(operation)
Sets the State Actuator Operation.
operation:
Type: integer
0 = Cpy
1 = Add
2 = Sub
3 = Inv
State Actuator Operation:
Cpy:
Makes the selected
State Mask group active.
Makes all other State Mask groups inactive.
Add:
Makes the selected
State Mask group active.
Other State Mask groups:
Active groups stay
active.
Inactive groups stay inactive
Sub:
Makes the selected
State Mask group inactive.
Other State Mask groups:
Active groups stay
active.
Inactive groups stay inactive
Inv:
If the Selected
State Mask group is active:
Makes the group
inactive.
If the Selected
State Mask group is inactive:
Makes the group
active.
Sample
Code
# get the controller
controller = GameLogic.getCurrentController()
# get the actuator attached to the controller named act
act = controller.getActuator("act")
# set the state actuator operation to cpy
act.setOperation(0)
# State Mask group 2 active
act.setMask(2)
# use it
GameLogic.addActiveActuator(act, True)
|