Luawe the Wayfarer Engine's scripting language All pages

An event

What every event has: the game's (level.beat, thing.touched...) and your own.

event:connect

event:connect(f)

Joins a function to the event: each time it happens the function runs, as a task of its own, with the event's values. Gives a connection back.

event:once

event:once(f)

Like connect, for the next time only.

event:wait

event:wait()

Pauses this task until the event happens, and gives its values.

event:fire

event:fire(...)

Makes one of your own events happen, with these values. (The game's events are made to happen by the game.)