Back to TPG

TPG.ControlPoint.GetStateColor

S🏷️ Controlpoint

Part of TPG namespace

TPG.ControlPoint.GetStateColor(state, progress, maxProgress)
View on GitHub|gamemode/objectives/sh_controlpoint.lua:39-50
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

The colour a point should draw at, given how far its capture has got. Fades toward the owning team's colour as the capture completes, and back through yellow as it is pushed to neutral, so the colour alone shows both who holds it and how firmly.

Parameters

NameTypeDescription
statenumberOne of the `STATE_*` values.
progressnumberCurrent capture progress, signed.
maxProgressnumberProgress needed for a full capture.

Returns

TypeDescription
Color

Examples

No examples available.

Used In

No usages found in the codebase.