1- To edit the script, double click on it, and the script editing interface opens. To start writing our script, we need to add a new Rule. To do so, right click on Script 0 and select Insert Rule.
A Rule is a conditional structure to say “IF something happens THEN I’ll do that, or ELSE I’ll do this”.
2- Then you need to add a new condition to your newly created Rule. Right click on the rule, and select Insert Condition... .
You will be prompted to choose which condition you want to add. In our case, we’ll use the isTriggeredByVehicle condition. Just type the function you are looking for in the bottom of the window and select it in the right panel.
The isTriggeredByVehicle condition returns TRUE if the trigger is activated by a specific vehicle, otherwise FALSE.
Keep in mind that you can always look for help in the scripting documentation by clicking on HELP\Scripting Help or click F1
After clicking on
OK a new GUI appears in order to set parameters the function correctly. In our case, the trigger named Trigger has to be hit by the vehicle called  SmallFamilyCar.
3- After your condition is setup correctly, we need to select the Action that will be executed when the condition is fulfilled. To do this, right click on the Rule and select Insert THEN action ... .
As for the Condition you have set up previously, you’ll be asked to select the function you want to execute when the condition is met. In that case, we want to make the pedestrian in front of the car cross the road. The function to do this is pedestrianCrossRoad.
In the supervision view, we want the pedestrian called Man_Allseasons_03 (which is the one in front of my EGO vehicle in my case) to cross the road. We just have to change this parameter.
4- Your Storyboard is now operational! It should look like this:
You can now save your scenario and execute it.
The execution of this Storyboard should look like this: