-
Notifications
You must be signed in to change notification settings - Fork 0
Zenkai Opcode FlashScreenColor
Flashes the whole screen a colour, and back.
FlashScreenColor(charIdx, r, g, b, frames)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).
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();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| Game | Notes |
|---|---|
| Legacy of Goku 2 | Supported |