COGS allows you to run additional checks after your initial WHEN… condition is met in a behaviour. You can do this using the If, Then, Otherwise action.
Another layer of conditions in your behaviour but within the actions after your main WHEN… condition of your behaviour is met. You can add more input, output and variable states. Like all conditions, these show in a Turquoise coloured box.
This is most useful when you are creating sequences **using Variables.**
Add actions that start once the main WHEN… condition and the added IF conditions are met. These show in a Blue headed box, within the action If, Then, Otherwise which is Purple.
Add actions that happen if the 'If' condition is not met. These show in a Blue headed box, within the action 'If, Then Otherwise' which is Purple.
N.B. You can add multiple layers of If, Then, Otherwise actions into If, Then, Otherwise actions. This means you can create multiple branches of logical possibilities.
Buttons need to be pushed in a specific order to complete a scene. I use behaviours with a number Variable to count up the correct sequence (see: DO: Update Values). But I only want the sequence to count up IF we are in the correct place in the sequence. If it is not in the correct place, I want the Variable to reset and a 'fail' sound to play.