set split screen to capture everything below z
Problem it solves
You have UI elements, dialogue boxes, or HUD sprites that should sit across the entire screen instead of being duplicated inside each player's camera view.
What this block does
Sets the maximum Z-index captured by the split-screen cameras. Sprites with a Z-index at or above this value will be rendered globally on top of the split screens.
The block
Block ID: splitscreen_setSplitScreenZIndex
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| z | number | 99 | The Z-index cutoff. Sprites below this depth render inside the cameras; sprites above stay on the main screen. |
Example
splitScreen.setSplitScreenZIndex(50) let hud = sprites.create(img`.`, SpriteKind.Player) hud.z = 100
Add the extension
Add github:riknoll/arcade-split-screen to your project, or open: Import arcade-split-screen.