Notch Notch Manual 0.9.23
 Light | Dark
SetPausePlayback()

SetPausePlayback()

Purpose #

Pauses and unpauses the playhead when running in Standalone. The definition of paused is that the play head does not advance (time stays constant, frame delta time is zero), but rendering still occurs.

This function only works in Standalone. It has no effect in Builder.

Syntax #

void SetPausePlayback(bool pause);

Parameters

pauseSets whether the play head is paused or not.

Example #

var frame = 0;
var flip = true;

function Update()
{
    Log("Frame: " + frame);
    frame = frame + 1;

    if (frame % 100 == 0)
    {
        SetPausePlayback(flip);
        if (flip == true)
            flip = false;
        else
            flip = true;
    }
}