Constructor


Event(x: any, y: any, w: any, h: any)

Arguments:

x: any
y: any
w: any
h: any




Methods


Event:addFlag(flag: any, amt: any)

Arguments:

flag: any
amt: any

Returns:

1: unknown|nil




Event:flash(sprite: any, offset_x: any, offset_y: any, layer: any)

Arguments:

sprite: any
offset_x: any
offset_y: any
layer: any


Event:getFlag(flag: any, default: any)

Arguments:

flag: any
default: any

Returns:

1: unknown|nil




Event:onAdd(parent: any)

Arguments:

parent: any


Event:onClone(src: any)

Arguments:

src: any


Event:onLoad()

Do stuff after the map has been loaded



Event:onRemove(parent: any)

Arguments:

parent: any


Event:postLoad()

Do stuff after the entire world has been loaded



Event:setFlag(flag: any, value: any)

Arguments:

flag: any
value: any


Event:setSprite(texture: any, speed: any, use_size: any)

Arguments:

texture: any
speed: any
use_size: any


Event:shake(x: any, y: any, friction: any, delay: any)

Arguments:

x: any
y: any
friction: any
delay: any


Event:shakeSelf(x: any, y: any, friction: any, delay: any)

Arguments:

x: any
y: any
friction: any
delay: any







Fields



Undocumented









Event.interact_buffer: number

Duration that the player cannot interact with events for on finishing interaction (in seconds)



Event.object_id: nil

ID of the object in the current room (automatically set after init)





Event.solid: boolean

Whether this object should stop the player



Event.sprite: nil

Sprite object, gets set by setSprite()



Event.sprite: Sprite

A simple object that renders a texture.
This texture must be placed inside assets/sprites/.



Event.sprite: nil

A simple object that renders a texture.
This texture must be placed inside assets/sprites/.



Event.unique_id: nil

User-defined ID of the object used for save variables (optional, automatically set after init)