The main and child scripts
The main script and the child scripts, which are simulation scripts, play the central role in each simulation: while the main script contains the simulation loop code, child scripts contain the typical code to control models (e.g. robots, sensors or actuators).
By default, each scene has a main script that handles all the functionality. Without main script, a simulation cannot run. The main script can be customized, but it is preferable to do all the customization work in a child script.
Each scene object can be associated with a child script that will handle a specific part of a simulation, in an independent and distributed fashion. The most common use for child scripts is to have them control a model.
Following are the main differences between the main script and a child script:
The main script as well as each child script have a list of simulation parameters attached, called script simulation parameters. Those parameters can be used as a quick way of adjusting values of a specific simulation model for example (e.g. the maximum velocity of a mobile robot or the resolution of a sensor).