M2O Scripting APIScripting reference
    Preparing search index…
    Global objectClient API

    Fade

    Fade: {
        in(durationSeconds: number, blockInput?: boolean): boolean;
        out(durationSeconds: number, blockInput?: boolean): boolean;
    }

    Controls the game's full-screen scene fader.

    Type Declaration

    • in: function
      • Fades from black back into the game scene.

        Parameters

        • durationSeconds: number

          Fade duration in seconds; negative values are clamped to zero.

        • OptionalblockInput: boolean

          Whether the game should block player input during the transition.

        Returns boolean

        True when the fade was started; false when the game fader is unavailable.

    • out: function
      • Fades the game scene to black.

        Parameters

        • durationSeconds: number

          Fade duration in seconds; negative values are clamped to zero.

        • OptionalblockInput: boolean

          Whether the game should block player input during the transition.

        Returns boolean

        True when the fade was started; false when the game fader is unavailable.