## transitionMode and transitionLevel

### Syntax:

    transitionMode (mode);

    transitionLevel (level);

### Purpose:

The transitionMode function chooses which transition type is used by the game. Valid values for mode are:

FADE Every pixel's brightness is faded to / from black.

DISOLVE A fixed selection of pixels is coloured over in black.

DISOLVE1 The same as DISOLVE.

DISOLVE2 A random selection of pixels is coloured over in black.

TVSTATIC A random selection of pixels is coloured over in random greys.

BLINDS The screen is divided into horizontal slices which open like blinds.

SNAPSHOTFADE The screen is faded to / from the current snapshot. *

CROSSFADE The same as SNAPSHOTFADE.

SNAPSHOTBOX The screen appears in an expanding rectangle over the current snapshot. *

The transitionLevel function specifies how visible the current screen is, from 0 to 256 inclusive. A level value of 0 means the scene is not visible at all (normally pitch black). A level value of 256 means the scene is completely visible and not affected by the current transition mode at all.

Note that the mouse cursor is not affected by transitions. All other elements - including speech, characters and status text - are affected.

* = See snapshotGrab for more information. This transition mode has no effect if there is currently no snapshot in memory.

### Example:

    # Choose which mode we want to use
    transitionMode (DISOLVE2);

    # Fade up
    for (var a = 0; a < 255; a += 10) {
       transitionLevel (a);
       pause (1);
    }
    transitionLevel (256);

    # Wait a while
    pause (100);

    # Fade down
    for (var a = 255; a > 0; a -= 10) {
       transitionLevel (a);
       pause (1);
    }
    transitionLevel (0);

### Return value:

No return value.

SLUDGE and this SLUDGE documentation are copyright Hungry Software and contributors 2000-2012