Skip to content

Zenkai Opcode FlashScreenColor

Johnathon edited this page Sep 20, 2026 · 1 revision

FlashScreenColor

Flashes the whole screen a colour, and back.

Syntax

FlashScreenColor(charIdx, r, g, b, frames)

Parameters

charIdx
Integer
Must exist on the current map (0 is the player). Selects the entity command queue the flash runs on.

r
Integer
Red, 0 to 255.

g
Integer
Green, 0 to 255.

b
Integer
Blue, 0 to 255.

frames
Integer
How long the flash lasts, in frames (60 is one second).

Remarks

The screen blends toward (r, g, b) over the first half of frames, reaches the full colour in the middle, then fades back. (255, 0, 0) is a red hit flash and (0, 0, 0) dips to black. The entity's command queue waits for the flash to finish before its next command. Tested in-game with red, purple and black.

The game uses it in its hit sequences, next to a sound and the damage effect:

BeginCommandBatch();
PlaySFX(0, 34);
PlayDamageEffect(0);
FlashScreenColor(0, 255, 0, 0, 20);
CommitCommandBatch();

Examples

Minimal illustrative encoding (synthetic, not from a real ROM script):

0x00, N           // PushByte(charIdx)
0x00, N           // PushByte(r)
0x00, N           // PushByte(g)
0x00, N           // PushByte(b)
0x00, N           // PushByte(frames)
0x02, 0x87        // Step -> FlashScreenColor

See Also

Applies To

Game Notes
Legacy of Goku 2 Supported

Clone this wiki locally