lua:cancelfunction
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| lua:cancelfunction [2014/12/27 07:15] – vodur | lua:cancelfunction [2026/10/14 00:15] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== cancel ====== | ||
| - | |||
| - | Syntax 1: cancel() \\ | ||
| - | Cancels any delayed functions linked to the game object invoking the cancel that have no tag set. | ||
| - | |||
| - | Syntax 2: cancel("< | ||
| - | Cancels any and all delayed functions linked to the game object invoking the cancel. | ||
| - | |||
| - | Syntax 3: cancel(tag[string]) \\ | ||
| - | Cancels any delayed functions linked to the game object invoking the cancel whose tag matches the tag argument. | ||
| - | |||
| - | Example1: | ||
| - | |||
| - | <code lua> | ||
| - | function do_stuff() | ||
| - | goto(31404) | ||
| - | mdo(" | ||
| - | goto(10204) | ||
| - | end | ||
| - | |||
| - | delay(10, do_stuff) cancel() -- do_stuff will never run | ||
| - | </ | ||
| - | |||
| - | Example2: | ||
| - | |||
| - | <code lua> | ||
| - | function do_stuff() | ||
| - | goto(31404) | ||
| - | mdo(" | ||
| - | goto(10204) | ||
| - | end | ||
| - | |||
| - | delay(10, do_stuff, " | ||
| - | cancel(" | ||
| - | </ | ||
| - | |||
| - | Example3: | ||
| - | |||
| - | <code lua> | ||
| - | function do_stuff() | ||
| - | goto(31404) | ||
| - | mdo(" | ||
| - | goto(10204) | ||
| - | end | ||
| - | |||
| - | delay(10, do_stuff, " | ||
| - | cancel(" | ||
| - | </ | ||
| - | |||
| - | See [[: | ||
lua/cancelfunction.1419664501.txt.gz · Last modified: by vodur
