Filter 2D Actuator Dilation: passNumber

passNumber:
  • gets/sets the position of the 2D filter in the stack of 2D filters.
     
  • Each position (Pass Number) can hold only one filter.

Type: 
  • integer

Range:

  • 0 - 100
Note:
  • The Dilation Actuator enlarges the white areas.
     
  • 2D Filters are applied to everything in the Scene.  Not just to the object they are attached to.
Sample Code


################  Get the stack position of the 2D filter

# import bge module
import bge

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

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

act = cont.actuators["Visor"]

# get 2D filter stack position
pos = act.passNumber
 
Sample Code


################  Set the 2D Filter stack position

# import bge module
import bge

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

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

act = cont.actuators["Visor"]

# set the 2D Filter stack position to 1
act.passNumber = 1