Expression Controller: Property

Property Expression: Simple Statement
  • Expression returns True or False
     
  • Expression returns True: One Positive pulse is sent to the attached actuator(s)
     
  • Expression returns False: One Negative pulse is sent to the attached actuator(s)
Examples:
  • Integer Property named Health
    • Health = 100
       
    • Health > 50
  • Boolean Property named Bomb and Timer Property named Countdown
    • (Bomb = True) and (Countdown = 0)
       
    • (Bomb = False) or (Countdown > 0)
       
    • (Bomb = True) and not (Countdown = 0)
Property Types:
  • Integer
     
  • Float
     
  • Boolean
     
  • String
     
  • Timer
Math Operators:
  • Addition: +
     
  • Subtraction: -
     
  • Multiplication: *
     
  • Division: /
     
  • Equal to: = or ==
     
  • Not Equal to: !=
     
  • Greater than: >
     
  • Greater than or Equal to: >=
     
  • Less than: <
     
  • Less than or Equal to: <=
Boolean Operators:
  • And/AND/and
     
  • Not/NOT/not
     
  • Or/OR/or
     
  • ()
Note:
  • Property names used in an Expression can't contain spaces
     
  • The Property has to on the same game object as the Expression Controller
Property Expression: Conditional Statement:
  • if (Expression, ExpressionTrue, ExpressionFalse)
    • Expression:
      • The expression to be evaluated.
    • ExpressionTrue:
      • If the expression is True, the type of pulse you want sent to actuator
         
      • True = Positive pulse
         
      • False = Negative pulse
    • ExpressionFalse: 
      • If the expression is False, the type of pulse you want sent to actuator
         
      • True = Positive pulse
         
      • False = Negative pulse
Conditional Statement examples:
  • Expression Controller has a Integer Property named Health
    • if(Health = 100, True, False)
       
    • if(Health != 0, False, True)
  • Expression Controller has a Boolean Property named Bomb and String Property named Guard
    • if (Guard = "Enemy" and Bomb = True, True, False)
       
    • if (Guard != "Enemy" or Bomb = False, False, True)
       
    • if (Guard = "Enemy" and not Bomb = False, True, False)
Property Types:
  • Integer
     
  • Float
     
  • Boolean
     
  • String
     
  • Timer
Math Operators:
  • Addition: +
     
  • Subtraction: -
     
  • Multiplication: *
     
  • Division: /
     
  • Equal to: = or ==
     
  • Not Equal to: !=
     
  • Greater than: >
     
  • Greater than or Equal to: >=
     
  • Less than: <
     
  • Less than or Equal to: <=
Boolean Operators:
  • And/AND/and
     
  • Not/NOT/not
     
  • Or/OR/or
     
  • ()
Note:
  • Property names used in an Expression can't contain spaces
     
  • The Property has to on the same game object as the Expression Controller
Expression:
  • The type of Controller
Name:
  • The name you give the Controller
State Mask Group:
  • The State Mask group the controller belongs to
     
  • A controller belongs to one and only one State Mask group
     
  • Sensors and actuators connected to the controller belong to the same State Mask group as the controller
Priority:
  • A controller with Priority enabled is executed before controllers that don't have Priority enabled
Checkbox:
  • Enabled:
    • Controller is turned on
  • Disabled:
    • Controller is turned off
Note:
  • A controller can be connected to more than one sensor
     
  • A controller can be connected to more than one actuator
     
  • A controller belongs to one and only one State Mask group
     
  • Sensors and actuators connected to the controller belong to the same State Mask group as the controller