mooball
    Preparing search index...

    Interface RoomStateBase

    interface RoomStateBase {
        clockPaused: boolean;
        copy(): RoomState;
        directionActive: boolean;
        endTicksMax: number;
        ext: RoomState | null;
        gameState: GameState | null;
        getPlayer(id: number): Player | null;
        goalTicksMax: number;
        gui: Gui;
        kickRate_max: number;
        kickRate_min: number;
        kickRate_rate: number;
        name: string;
        overtimeLimit: number;
        pauseTicksMax: number;
        players: Player[];
        runDefaultGameLogic: boolean;
        runSteps(count: number): void;
        scoreLimit: number;
        stadium: IStadium;
        teamColors: TeamColors[];
        teamsLocked: boolean;
        timeLimit: number;
    }
    Index

    Properties

    clockPaused: boolean

    Whether the clock is paused or not.

    directionActive: boolean

    Whether player directions are active or not.

    endTicksMax: number

    Number of ticks the physics engine waits after deciding that the game is over before ending the game.

    ext: RoomState | null

    The extrapolated version of this RoomState, or null if the data is not available.

    gameState: GameState | null

    Current state of the game, or null if the game is stopped.

    goalTicksMax: number

    Number of ticks the physics engine waits after each goal before restarting the game.

    gui: Gui

    Gui-related values of the room.

    kickRate_max: number

    The max value of kick rate limit.

    kickRate_min: number

    The min value of kick rate limit.

    kickRate_rate: number

    The rate value of kick rate limit.

    name: string

    Name of this room.

    overtimeLimit: number

    The over-time limit of this current RoomState in seconds. -1 = no limit.

    pauseTicksMax: number

    Number of ticks the physics engine waits after each pause before resuming the game.

    players: Player[]

    All players that are currently in this room.

    runDefaultGameLogic: boolean

    Whether the game will run its default logic or not. If this value is false, you will probably want to write your own game logic from scratch in onGameTick.

    scoreLimit: number

    The score limit of this current RoomState. 0 = no limit.

    stadium: IStadium

    The stadium that the game is currently being played in.

    teamColors: TeamColors[]

    The custom colors for each team. The 0th index has null because it's the Spectators team.

    teamsLocked: boolean

    Whether the teams are locked or not. The non-admin players are allowed to change teams only if this feature is disabled and the game is stopped.

    timeLimit: number

    The time limit of this current RoomState in seconds. -1 = no limit.

    Methods

    • Returns a snapshot of the current room state. You can load the returned object directly into sandbox using its useSnapshot(roomState) function.

      Returns RoomState

      A complete snapshot of the current room state.

    • Returns the Player object for the player whose id is id.

      Parameters

      • id: number

        The id of the player to be returned.

      Returns Player | null

      The Player object, or null if the player is not found.

    • Runs the simulation count steps. Use with extreme caution, especially on network rooms.

      Parameters

      • count: number

        Number of steps to run the simulation.

      Returns void

      void.