TheAdd Condition dialog andAdd Action dialog are very similar so they are both documented here. These dialogs allow you to add or edit acondition oraction in anevent sheet.
Adding a condition or action takes three steps:
- Choose theobject type that has the condition or action
- Choose the condition or action in that object type
- Enter parameters, if any, such as the X and Y co-ordinate forSet Position.
TheNext andBack buttons can be used to move forwards and backwards through these steps.
Step 1: Choose the object
In this step a list of all the object types in the project is shown. TheSystem object (which represents built-in features) always appears first, and the rest of the objects are listed in alphabetical order. If object types are arranged in to subfoldersPaid plans only in theProject Bar, then folders also appear in this dialog.
Double-click an object to choose it, or a folder to open it. Typing in thesearch box in the top-right can quickly filter the list if there are many objects. Searching lists results from all folders.
The conditions and actions each object contains is related to the kind of object it is (e.g. Sprite, Keyboard or Audio). For example, to locate thePlay sound action in the Add Action dialog, first double-click the Audio object. Remember the System object contains some conditions which can be used for any object, such asPick random andFor Each.
Step 2: Choose the condition or action
In this step a list of all theconditions oractions available for the chosen object is displayed. They are arranged in to related categories. Below a list of the System object's conditions is shown.
Some conditions and actions are very commonly used, such asStart of layout orOn collision. To help you identify these quickly, commonly used conditions and actions are highlighted with a yellow background.
Double-click a condition or action to choose it. As before, typing in thesearch box can help quickly locate a condition or action in the list.
For more information on each condition or action, see the reference section of the manual. If the chosen object has anybehaviors, they may add extra conditions and actions in to the dialog as well.
Some conditions and actions requireparameters. For example, theSet position action for a Sprite requires the X and Y co-ordinates to be entered. This is done in the Parameters dialog in the next step. However, some conditions and actions do not use any parameters, such as theDestroy action. In this case once the condition or action is chosen the process is complete.
Functions andcustom actions both provide ways to add your own items to the list of available actions.
Step 3: Enter parameters
If the chosen condition or action requires parameters, theParameters dialog appears for the parameters to be entered in to. For more information, see the manual entry for theParameters dialog.