Search the docs

Find a guide, global, type or member

GlobalEmber

ui

Screen and world-wide feedback. Functions without a player argument reach everyone in this experience's world.

Functions

ui.broadcast(text: string)#

Sends a chat message to everyone in the world.

ui.title(title: string, subtitle: string?, fadeIn: number?, stay: number?, fadeOut: number?)#

Shows a title to everyone. Fades default to 0.5s in, 3.5s stay, 1s out.

ui.actionBar(text: string?, slot: string?, seconds: number?)#

Like Player:actionBar, for everyone in the world.

ui.sound(sound: string, x: number, y: number, z: number, volume: number?, pitch: number?)#

Plays a sound at a point, heard by players nearby. Volume >= 0 (default 1), pitch 0.5..2 (default 1).

ui.particle(particle: string, x: number, y: number, z: number, count: number?, dx: number?, dy: number?, dz: number?, speed: number?)#

Spawns particles at a point for everyone. count 1..1000 (default 1); dx/dy/dz spread and speed default to 0.

ui.bossbar(text: string, progress: number?, color: BarColor?, style: BarStyle?) -> BossBar#

Creates a boss bar. progress 0..1 (default 1), colour default "white", style default "solid". At most 64 at once.

ui.dialog(player: Player, options: DialogOptions, fn: ((player: Player, button: number?) -> ())?)#

Shows a dialog with buttons. fn gets the 1-based button, or nil when the player closed it. A new dialog for the same player replaces the old one, whose fn is then never called.