## 11.1. Creating and Editing Timers

The easiest way to create and alter timers is from the World Editor, the place where all settings of a World are altered (see Chapter 4, Editing a World).

Timer are defined in the Timers section inside the Automation section. When you open that section, you'll see a list of the defined timers and some buttons like this:

Figure 11.1. The graphical Timer editor

The main part of the window is the list of defined timers. The columns are as follows:

- Enabled specifies whether the timer is enabled or not. Timers that are not enabled are not active and will not be run, but they remain in the list so that they can later be enabled again.

- Name is a name that is assigned to a timer. This helps you identify the timer's purpose and is useful when editing a timer via the command line (as described in Section 11.2.1, “Editing Timers”). Assigning a name to a timer is optional.

- Interval is the interval between timer activations, as described above. Fractions of seconds are allowed: an interval of 0.5 means a timer that fires each half-second.

- Count is the repeat count, as described above.

- Action is the action that is run when the timer fires.

- Temp indicates whether the timer is temporary or not. Temporary timers are deleted automatically when their repeat count reaches 0.

- Plugin: if this is non-empty, it means that the timer belongs to a plugin (and the name of the plugin is displayed). However, by default plugin timers are not displayed. See Section 4.7, “Advanced” for information on how to display plugin timers here.

### 11.1.1. Adding Timers

To add a new timer, press the Add button. This will open a window for you to edit the new timer's parameters:

Figure 11.2. The window to edit timers

What can be set represents the columns described above.

When you are finished, press OK and the timer will be added. If you change your mind, press Cancel and the timer will not be added.

To see some things timers can do, read Section 11.2, “Defining Timers in the Command Line”. If you want to try the timers described there, you can create them from the World Editor.

### 11.1.2. Editing Timers

To edit a timer, select it by clicking its line in the list (the line will be highlighted), and press the Edit button. A window like the one used for adding timer (see Section 11.1.1, “Adding Timers”) will be opened, filled with the timer's parameters. Change what you want, and press the OK to commit the changes. If, however, you change you mind, press Cancel and the changes will be not be made, the timer will remain as it was before.

Another shorter way to edit a timer is to double click its line in the list.

It is also possible to change the value of the binary options (those represented by a check box) directly from the timer list. Make sure that the timer you want to change is selected, and click in the check button. The state will be toggled.

To delete a timer, select it and press the Delete button. You will be asked for confirmation, and can cancel the operation, but once deleted, you cannot recover the timer. If you want, you can disable this confirmation dialog, but if you do so and click the Delete button, the only way to undo your action will be creating the timer again. See Section 4.7, “Advanced”. To delete several timers at once, select them all and press Delete.

The final thing that needs to be explained with regard to timers is how to reorder them. Timers as tried from the first one to the last, so in a few cases the order might matter. To move a timer up or down in the list, select it and press the corresponding button.