The SCA is part of the Scenes Loop which is part of the Game Loop.
Here you define the behaviour of your game. Knowing the SCA concept means knowing how to create the expected behaviour and knowing how to create efficient logic.
Sensors
I explained the setup of sensors and how they work in another thread.
Here I show you how sensors fit into the big picture.
Active sensors are ALWAYS evaluated regardless what parameters you set. There is no parameter that prevents a sensor to be evaluated at every frame.
For more information on Sensors look at Sensors - A Word on Pulses.
Sensors are active if they are connected to a controller of the current state.
This means if the sensor is not connected to a controller in the current state it is not evaluated. This becomes quite handy if you want to stop the evaluation of “heavy” sensors like radar or ray.
Dependent on their paramters evaluated sensors trigger their connected controllers
Controllers
ALL triggered controllered are executed, regardless if the sensor’s state is True or False.
and
ONLY triggered controllered are executed, regardless if the sensor’s state is True or False.
There is no way to execute controllers that are not triggered by their connected sensors. So it is important to choose the right sensors for your controllers.
Executed controllers send activation or deactivation signals to their connected actuators.
Actuators
Activation and deactivation is input from a connected controller. For that reason we call them activation signal and deactivation signal.
Receiving these signals does not necessarily mean the actuator gets activated or deactivated.
For example: an action actuator in flipper mode plays
- the action forward when receiving the activation signal by a controller from the current pose.
- the action reverse when receiving the deactivation signal by a controller. It deactivates after the reverse playing is done.
How long an actuator stays active depends on the actuator type.
We have sensors that run for one frame only, while others wait for deactivation signals, or stay active until they are done even with deactivation signal.
For more information look at Actuators - A Word on execution
I do not want to go into to much detail, so I hope you find this information usefull.
Monster