Candy Logo Copyright © 2025-2026 Candy Arts

BG Stop
The BG_Stop command stops the playback of one or more background layers on a chosen frame. The layers remain on screen: to clear them, use BG_Remove. Keys Every key also accepts a ¢ expression instead of a fixed value, unless its description says otherwise. See CandyRef Expressions. Layers Description: The layers of the Background Scene to act on. Each key is a layer's name, and its value is a Dictionary of settings for that layer (see below), or an empty Dictionary for none. Every layer must be listed by name; there is no shorthand for all layers. An entry that can't be found is reported and skipped, without affecting the others. Values: • Layer name: The name of a layer node in the Background Scene's bg_container, such as Sky. • ¢ expression: Can also return the layer node itself. Layer Settings Each layer in Layers accepts the following keys. Stop_Frame Description: The frame the layer stops on. The layer remains on screen: to clear it, use BG_Remove. Values: • 0: Stop on the current frame. • -1: Stop on the last frame. • Positive number: Stop on that frame, counted from 1 and clamped to the available frames. • Empty: 0. Loops Description: Stops the playback once it has played this many loops, counted from its start, rather than at once. It replaces the Loops and Duration of the Line that started the playback, and the playback then stops on this Line's Stop_Frame. The Dialogue doesn't wait for it. A point that has already passed stops the playback at once, where it is; so does media that isn't playing (held by a Loops of 0, finished or already stopped). Values: • Empty or null: No loops: stop at once, unless Duration is set. • 0 or a positive number: The number of loops, counted from the start of the playback. Duration Description: The time the playback continues after those loops before it stops, counted on playback as the Duration of a Play command is: paused time doesn't count. With an empty Loops, it counts from the start of the playback. Values: • Number of seconds: Such as 2.5. • Timestamp: In the format SS.xx, MM:SS.xx or HH:MM:SS.xx, such as 01:30.5. • f=N: N frames, counted at FPS, else at the frame rate the media plays at. SpriteFrames count their own frames. • 0, null or empty: No duration: Loops alone decides. FPS Description: The frame rate an f= Duration counts with. Values: • Frames per second: Such as 12. • Empty: The frame rate the layer plays at. Take_Hold Description: Whether this command takes hold of the background scene, if it is Public. While an Engine holds it, its Public Mode determines what other Engines can do with it: nothing (Exclusive), only the commands it lists (Semi-Exclusive), or anything (Free). The hold applies to the whole scene, and lasts until the holding Engine's Dialogue ends. Setting Take_Hold on any layer of the Line applies it to the whole scene. Values: • Empty: The background scene decides, from its own list of commands that take hold. • 1: Take hold, even if the background scene doesn't list this command. • -1: Never take hold.