Changes between Version 18 and Version 19 of Triggers
- Timestamp:
- Jun 24, 2014, 9:57:38 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Triggers
v18 v19 121 121 The first parameter of the trigger is the event on which it will be executed. In the example, the trigger will be executed for every player command. See the table below for a list of all possible events. The second parameter is the name of the action, which has to be defined under the Trigger prototype. And the third part is a data object. For most triggers, this data will be just enabled = true or false. But for more complicated triggers (range triggers, time triggers, ...) this data can contain other elements, such as the the distance of the range trigger, or the interval of the timer. Again, see the data in the table below. 122 122 123 The combination of event and action name must be unique. This combination can be used to enable and disable triggers. Registering a trigger twice isn't possible, and t ou will be warned when you do that.123 The combination of event and action name must be unique. This combination can be used to enable and disable triggers. Registering a trigger twice isn't possible, and thou will be warned when you do that. 124 124 125 125 When you have your first triggers registered, they can fire actions, but actions can again register new triggers. As this time, it happens within the `Trigger` prototype, you can access `cmpTrigger` simply with `this`.