Skip to Content

Skill Check

SkillCheck

Runs a skill check with the defined difficulty.

lib.skillCheck(difficulty, inputs, options) exports['prism_uipack']:SkillCheck(difficulty, inputs, options)
  • difficulty: 'easy' or 'medium' or 'hard' or table
  • Preset difficulties:
  • โ€˜easyโ€™ - { areaSize: 50, speedMultiplier: 1 }
  • โ€˜mediumโ€™ - { areaSize: 40, speedMultiplier: 1.5 }
  • โ€˜hardโ€™ - { areaSize: 25, speedMultiplier: 1.75 }
  • Custom difficulties can be set by sending an object instead of one of the preset strings above
  • areaSize: number

Size of the success area in degrees

  • speedMultiplier: number

Multiplier for the speed of the indicator

  • inputs?: string[]
  • A random key will be picked from the inputs table for each skill check
  • If no inputs are defined the key is defaulted to e
  • options?: table (object)
  • label?: string
  • instruction?: string
  • type: rect | circle

SkillCheckActive

Returns true if a skill check is currently active.

lib.skillCheckActive() exports['prism_uipack']:SkillCheckActive()

CancelSkillCheck

Returns true if a skill check is currently active.

lib.cancelSkillCheck() exports['prism_uipack']:CancelSkillCheck()

Example

ox_lib

-- Standard lib.skillCheck({ 'easy', 'medium', 'hard' }, { 'e', 'e', 'e' }) -- Custom Options lib.skillCheck({ 'easy', 'medium', 'hard' }, { 'e', 'e', 'e' }, { label = "Custom Label", instruction = "Press E to win!" }) -- Other style lib.skillCheck({ 'easy', 'medium', 'hard' }, { 'e', 'e', 'e' }, { type = 'rect' })

Exports

-- Standard exports['prism_uipack']:SkillCheck({ 'easy', 'medium', 'hard' }, { 'e', 'e', 'e' }) -- Custom Options exports['prism_uipack']:SkillCheck({ 'easy', 'medium', 'hard' }, { 'e', 'e', 'e' }, { label = "Custom Label", instruction = "Press E to win!" }) -- Other style exports['prism_uipack']:SkillCheck({ 'easy', 'medium', 'hard' }, { 'e', 'e', 'e' }, { type = 'rect' })
Primary Progress BarSecondary Progress Bar
Last updated on