IdaJS
    Preparing search index...

    Interface SceneLoadModes

    Used in the scene event to let the mod developer know the reason why the scene is being loaded.

    interface SceneLoadModes {
        $: EnumHandler;
        NewGameStarted: 0;
        PlayerMovedHere: 1;
        PlayerTeleportedHere: 2;
        WillLoadSavedState: 4;
    }
    Index

    Properties

    Enum handler functions for this object

    NewGameStarted: 0

    This scene was loaded because a new game started.

    PlayerMovedHere: 1

    Player normally moved here by walking.

    PlayerTeleportedHere: 2

    Player teleported here by a script

    WillLoadSavedState: 4

    We are loading a saved game from a save file.

    The game will be loaded from a saved state after this callback finishes (either save file or a backup state).

    Do not initialize scene and game variables or start new coroutines in this mode, as they will be restored from the save file afterwards.

    You should still do other scene initializations in this mode: initialize your objects, zones and waypoints, register handlers, register the coroutines, etc.

    Some objects and zone states will be overwritten afterwards, by loading the saved game state.