Skip to Content

Skill Check

Bar and circle minigames with configurable difficulty levels.

Client Exports

skillCheck

Start a skill check minigame. This is an awaitable export that returns the result.

local success = exports['trinity-ui']:skillCheck(difficulty, inputs)

Parameters:

ParameterTypeDescription
difficultystring | table | table[]Difficulty preset or custom config (see below)
inputsstring[]Keys the player must press (default: {'e'})

Difficulty Presets:

PresetDescription
'easy'Large success zone, slow speed
'medium'Medium success zone, moderate speed
'hard'Small success zone, fast speed

Custom Difficulty:

{ areaSize = 40, speedMultiplier = 1.0 }
PropertyTypeDescription
areaSizenumberSize of the success zone
speedMultipliernumberSpeed of the indicator

Returns: true if passed, false if failed.


cancelSkillCheck

Cancel an active skill check.

exports['trinity-ui']:cancelSkillCheck()

skillCheckActive

Check if a skill check is currently running.

local active = exports['trinity-ui']:skillCheckActive()

Examples

Single Check

local success = exports['trinity-ui']:skillCheck('medium') if success then print('Skill check passed!') else print('Skill check failed!') end

Multiple Stages

Pass an array of difficulties to create a multi-stage skill check. The player must pass each stage in order.

local success = exports['trinity-ui']:skillCheck( { 'easy', 'medium', 'hard' }, { 'e', 'e', 'e' } ) if success then print('All stages passed!') end

Custom Difficulty

local success = exports['trinity-ui']:skillCheck({ { areaSize = 50, speedMultiplier = 0.8 }, { areaSize = 30, speedMultiplier = 1.2 }, { areaSize = 20, speedMultiplier = 1.5 } })
Last updated on