• Studio

  • Studio API

  • Bots

  • Web API

  • Designer Resources

  • Host Resources

  • Globals

    GameServer

    Inherits from:

    In Highrise's scripting environment, the GameServer class acts as the high-level game context the script is running remotely. Any server-level interaction or manipulation will be found in this class. Specifically, scripts marked 'Server' or 'Client and Server' can access server - with 'Client and Server' scripts requiring you to check if server is not nil (or client is nil). Any high-level server events and interactions will be found in this type.

    Properties

    PlayerConnected

    ServerOnly
    ReadOnly

    An event that is triggered when a new player gets connected to the game. This mechanism allows developers to trigger specific actions in response to a player's connection. Note that this is not when the player's Class.Avatar is spawned. For avatar spawn, see Class.Player when in a Class.GameClient side script.

    PlayerDisconnected

    ServerOnly
    ReadOnly

    An event that is set off when a player disconnects from the game. This feature is crucial in managing actions that follow a player's disconnection.

    isLoading

    boolean
    ServerOnly
    ReadOnly

    Indicates whether the server is currently in a loading state.

    sceneCount

    number
    ServerOnly
    ReadOnly

    scenes

    ServerOnly
    ReadOnly

    spectatorCount

    number
    ServerOnly
    ReadOnly

    spectatorScene

    ServerOnly
    WriteOnly

    Methods

    Returns

    number

    LoadScene

    ServerOnly

    Loads a scene into the game environment.

    Parameters

    sceneId
    number
    additive
    boolean

    Returns

    LoadScene

    ServerOnly

    Loads a scene into the game environment.

    Parameters

    sceneName
    string
    additive
    boolean

    Returns

    Loads a scene additively into the game environment.

    Parameters

    sceneId
    number

    Returns

    Loads a scene additively into the game environment.

    Parameters

    sceneName
    string

    Returns

    Moves a player to a specified scene within the game environment.

    Parameters

    player
    scene

    Returns

    boolean

    OnWorldEvent

    ServerOnly

    Parameters

    callback
    (eventName: string, isLocal: boolean, payload: any) -> ()

    Returns

    void

    SendWorldEvent

    ServerOnly

    Parameters

    eventName
    string
    eventPayload
    any

    Returns

    void

    SendWorldEvent

    ServerOnly

    Parameters

    eventName
    string
    eventPayload
    any
    callback
    (error: EmitWorldEventError) -> ()

    Returns

    void

    SendWorldEvent

    ServerOnly

    Parameters

    eventName
    string
    eventPayload
    any
    callback
    (error: EmitWorldEventError) -> ()
    instanceIds
    string[]

    Returns

    void

    Parameters

    priority
    number

    Returns

    void

    Updated 9 days ago

    PocketWorlds Icon

    © 2025 Pocket Worlds. All rights reserved.