CREATE YOUR WORLD
Multiplay

Setting in Private Room runtime

4min
you can change the multiplayer room attribute at runtime please create the server code index ts sandbox function definition setprivate(isprivate boolean) promise true set to private room \ false set to public room 📘 please refer to the following guide \[ zepeto multiplay(server) api https //developer zepeto me/docs/multiplay server/classes/zepeto multiplay sandbox#setprivate ] example of use import { sandbox, sandboxoptions, sandboxplayer } from 'zepeto multiplay'; export default class extends sandbox { oncreate(options sandboxoptions) { this onmessage("setprivate", (client sandboxplayer, value boolean) => { console log(`try set private ${value}`); this setprivateroom(client, value); }); } async setprivateroom(client sandboxplayer, value boolean) { await this setprivate(value); client send("log", `room set private ${this private}`); } } 👍 difference between lock and private functions the locked multiplayer room is not visible in the zepeto room list and cannot be entered by invitation private multiplayer rooms are not shown in the list of zepeto rooms, but invitations are acceptable