EGGOXdevelopers

Rooms, copies and invitations

Call Purpose --- --- send(player, roomName) Enter a copy of another room in this game send({p1, p2}, roomName, true[, tag]) Start a fresh copy for these player

CallPurpose
send(player, roomName)Enter a copy of another room in this game
send({p1, p2}, roomName, true[, tag])Start a fresh copy for these players
send(player, roomName, code)Enter that room's copy by its code
here()This copy's four-character code
tag()Its creation tag, or nil
crowd(roomName)Approximate player count across copies, refreshed every two seconds
matches(roomName)The running copies of that room, {{code, players, tag, watch, locked}, ...}, refreshed with crowd
watch(player, roomName, code)Into the stands of that copy: no avatar, sees and hears everything; refused where the room's watching is off
invite(player, friendId[, text])Invite an online friend into this copy

Room names must match the game's room names. send_failed reasons include no_such_room, no_such_copy, and full. A copy's lock blocks ordinary admission, but a valid invitation can enter if capacity permits. Each room still has its own Lua state. Use saves to share progress across rooms.

This page as markdown: /api/rooms-copies-and-invitations.md