All pages

Scene and players

Call Effect or return value --- --- things() All things in the copy, including hidden stock named(name) Things with that exact name, as an array tagged(tag) Th

CallEffect or return value
things()All things in the copy, including hidden stock
named(name)Things with that exact name, as an array
tagged(tag)Things carrying that tag (set in the room's things list), as an array
at(x, y)Things on that tile
players()Players currently in the copy
move(thing, x, y[, seconds])Move scenery; default glide is one tick, 0 snaps
hide(thing), show(thing)Hide scenery or restore it
spawn(thing, x, y)Reveal a hidden stock object at a tile
tint(thingOrPlayer, "#rrggbb"[, seconds])Tint; optional duration fades it
tint(thingOrPlayer)Remove tint
floor(x, y, "#rrggbb")Colour a tile of the ground; floor(x, y) takes it off, floor() clears the whole floor as one effect
floor_rect(x, y, w, h[, "#rrggbb"])Colour a rectangle of up to 48 by 48 tiles as one effect; without a colour it takes the rectangle off
walk(player, x, y)Request normal walking
teleport(player, x, y)Place a player on a tile
size(width, height)Resize a copy within its authored room bounds
lock(), unlock()Close or reopen admission to the current copy
input(mode), input(player, mode)Set controls for the copy or one player

A thing is a table with id, name, x, y, and, when it has them, item (the item id), tag and state (its current state's name). Things carry the tag and starting state given in the room's things list, so a script can find "the third plot" with tagged("plot-3")[1] instead of by position.

A click on a thing counts when the player stands beside it; a click from further away walks there first. A room with "click": "anywhere" in its settings, or a thing with "click": "anywhere", takes the click from any tile at once: games played by clicking, with nobody walking.

Input modes: grid is ordinary walking and queued keys; keys sends keys immediately and disables ordinary walking; none ignores movement/game keys. Enter belongs to chat. Text fields capture their own typing. UI buttons still work when movement is disabled. On a phone a tap walks, a hold shows the corner card and dragging pans.

The floor is a colour layer on the copy, not scenery: a painted arena needs no floor things, so a script may colour thousands of tiles (an event still counts each floor(x, y, colour) as one effect; floor() and floor_rect are one). Late joiners receive the whole floor. It is drawn in the isometric view.

Scene changes go through the server's room rules. spawn reuses authored stock; it does not manufacture arbitrary new items. Use unique names when selecting one object and check that named(name)[1] exists.

This page as markdown, for you or your agent: /api/scene-and-players.md