UI Progress Bar

Shows a bar that fills up to track progress, for a countdown, a timer or a level. You choose the size, the colors and up to three checkpoint marks.

Games & Interactivity

Game engines, physics, quizzes, leaderboards, and the UI controls that tie it together.

Made with this block

Inputs

positionvec2

Screen position of the progress bar, where (0, 0) is the top-left corner and (1, 1) is the bottom-right corner.

widthfloat

Width of the progress bar in screen anchor units. Range from 0 to 2, where 0 means no visible progress bar and 2 means the progress bar spans the full width of the screen (from the left border to the right).

heightfloat

Height of the progress bar in screen anchor units. The range is from 0 to 0.25, where 0 means no height at all (no visible progress bar) and 0.25 is the maximum height.

rotationfloat

Rotation in degrees, counterclockwise (0-360)

backgroundColorvec4

Color of the background behind the bar

barColorvec4

Bar color

roundnessfloat

Corner roundness of bar and background (0-1), where 0 - square ends, no corner radius, 1 - fully rounded ends, pill-shaped

borderWidthfloat

Border thickness around the bar (0-1, where 1 = 1/8 screen height)

checkpointCountint

Number of visible checkpoints (0-3)

checkpointColorvec4

Color of all checkpoint markers

checkpointPosition1float

Normalized position of checkpoint 1 (0-1)

checkpointPosition2float

Normalized position of checkpoint 2 (0-1)

checkpointPosition3float

Normalized position of checkpoint 3 (0-1)

Events

onCheckpoint1Reached

Progress crosses the leftmost active checkpoint (sorted by position)

onCheckpoint2Reached

Progress crosses the second-leftmost active checkpoint

onCheckpoint3Reached

Progress crosses the rightmost active checkpoint

onProgressBarFull

Progress reaches 1 (from below)

onProgressBarEmpty

Progress drops to 0 (from above)

Functions

setProgressvoid

Sets the bar fill amount (0-1)

getProgressfloat

Returns the current progress value