Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Lobby Values

paige edited this page Sep 6, 2023 · 3 revisions

Lobbies have two main value things those being lobby values and starter player values


Lobby Values

Values for lobbies that are created when the lobby is created or by using new lobby.Value()

let lobby = new inst.Lobby(ctx, {
    values: {
        score: 0
    }
});

console.log(lobby.score); // 0

new Lobby.Value()

description: creates a new lobby value
parameters:

  • name String: name of the value
  • content Any: content of the value
let lobby = new inst.Lobby(ctx);

new lobby.Value("score", 0);

console.log(lobby.score); // 0



Starter Lobby Values

Values for lobbies that are created when the instance is created or by using new inst.StarterLobbyValue()
Starter lobby values are automatically applied onto every newly created lobby

let inst = new Pangine("inst", {
     starterLobbyValues: {
          score: 0
     }
});

let lobby = new inst.Lobby(ctx);

console.log(lobby.score); // 0

new Inst.StarterLobbyValue()

description: creates a new starter lobby value
parameters:

  • name String: name of the value
  • content Any: content of the value
let inst = new Pangine("inst");

new inst.StarterLobbyValue("score", 0);

let lobby = new inst.Lobby(ctx);

console.log(lobby.score); // 0
Clone this wiki locally