Candy Logo Copyright © 2025-2026 Candy Arts

BG Effect Play
The BG_Effect_Play command plays one or more effects on background layers, such as a shake or a flash. An effect is an animation from an AnimationLibrary, played by an AnimationPlayer child of the layer, which the Background Scene reuses or creates. All effects start at the same time, and the Dialogue resumes once each one with a Wait_Loops or Wait_Time has played for that duration. See Background Effects. 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 lists its effects under the following key. Effects Description: The effects to act on for this layer. Each key is the name of the animation the effect plays, and its value is a Dictionary of settings for that effect (see below), or an empty Dictionary for none. Values: • Animation name: An animation of the AnimationLibrary set in Library, such as Shake. • Library/Name: When Library is empty, an animation already available on one of the layer's AnimationPlayers. Effect Settings Each effect in Effects accepts the following keys. Library Description: The AnimationLibrary containing the effect's animation, whose name is the effect's key in Effects. Loading a library replaces any library that earlier effects loaded onto the same AnimationPlayer; the player's own animations, including RESET, are retained. Values: • Library name: A file in {background_folder}/Animation_Libraries. The scene's default_effect_extension (.tres by default) is added when the name has no extension. • res:// or user:// path: Loaded from that path. • Empty: The effect's key names an animation already available on one of the layer's AnimationPlayers, either as Library/Name or as one of the player's own animations. Loops Description: The number of times the effect plays. Values: • Positive number: Play that many times. • 0: Hold the first frame without playing, unless a Duration is set. There is nothing to wait for until a BG_Effect_Resume starts playback, which then plays once. The effect always restarts from the beginning. • -1 or any negative number: Loop indefinitely, whatever the Duration. • Empty: 1. Duration Description: The time the effect continues to play after its Loops, so that it can stop partway through a loop. It plays for Loops × its length + Duration: with a Loops of 0, it plays for the Duration alone. A duration longer than one loop carries over into additional loops. When the time runs out, the playback ends as if its last loop had finished, on its Stop_Frame. The effect retains the pose it reached. Paused time doesn't count. 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 on the animation's own frames, otherwise at FPS. • 0, null or empty: No duration: Loops alone decides. Stop_Frame Description: The frame the effect stops on once it has played its Loops and Duration, as a BG_Effect_Stop with the same value would stop it. Values: • 0: Retain the pose it ends on. • Clear or X (case-insensitive): Play the RESET animation of the animation's library, or the player's own RESET animation, if one exists, then stop. • -1: Retain the pose of the last frame. • Positive number: Retain the pose of that frame, counted from 1. An animation's frames are its keyframes. • Empty: 0. Wait_Loops Description: The number of completed loops the Dialogue waits for before resuming. The Dialogue resumes after Wait_Loops loops plus Wait_Time into the following loop, or earlier if playback ends or is stopped. When several entries of the Line have a wait, the Dialogue resumes once all of them have reached it. Values: • 0: Don't wait for any loops. If Wait_Time is also 0, the Dialogue doesn't wait at all. • Positive number: The number of loops to wait for. Wait_Time Description: The additional time the Dialogue waits after Wait_Loops, measured into the following loop. A time longer than the media carries over into additional loops. 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 on the animation's own frames, otherwise at FPS. • 0 or empty: No additional wait. FPS Description: The frame rate used to count f= values in animations that have no frames of their own. An animation's frames are the keys of its most-keyed discrete track, or its step value. Values: • Frames per second: Such as 12. • Empty: The default frame rate, default_effect_fps. 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 effect 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.