When a behavior is loaded:
When it is unloaded:
When it is started (or played):
When it is stopped, it is unloaded.
When a box is loaded, the onLoad function of its script is called. For further details about this kind of built-in functions, see the section: Built-in functions in the script of a box.
When it is unloaded:
When it is started (with an onStart input):
The onInput_<input_name> function of its script is called.
If it is a flow diagram box, then the signal received on the onStart input is transmitted to the diagram of the box.
If it is a timeline box, then its time cursor is played. So it starts being regularly incremented.
When it is started but its resources are not available and even after the timeout specified they are still unavailable:
When it is stopped with an onStop input:
When it is stopped with an onStopped output:
When it is stopped because its resources are set to Stop on demand and they are asked by another box:
Note
Sometimes it can take some time for a behavior to stop. For instance, if NAO is walking, the “Walk” behavior you want to stop will wait for NAO’s feet to be stable before stopping, so that the robot doesn’t fall down.
When a diagram is loaded:
When it is unloaded:
When a timeline is loaded:
When it is unloaded: