scripting:functions_custom_events_overview
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| scripting:functions_custom_events_overview [2012/03/25 18:36] – mit | scripting:functions_custom_events_overview [2025/05/28 16:34] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 27: | Line 27: | ||
| The ' | The ' | ||
| </ | </ | ||
| + | |||
| + | ===== Custom Events ===== | ||
| + | You can add your own custom events, and then trigger them from a command. (And hence, you can trigger custom events from within other events). When you trigger a custom event in your script, the new event is executed immediately and the main event waits until it completes or when the new event sleeps. | ||
| + | |||
| + | A custom event is defined as shown: | ||
| + | |||
| + | < | ||
| + | | ||
| + | { | ||
| + | *say My Custom Event has been triggered for %PLAYER% | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | This custom event can be triggered using the command '' | ||
| + | < | ||
| + | | ||
| + | </ | ||
| + | would display '' | ||
| + | |||
| + | <note important> | ||
| + | Be very careful with events calling other events, particularly when using '' | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
scripting/functions_custom_events_overview.1332700600.txt.gz · Last modified: (external edit)
