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'ortable
- 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:
numberSize of the success area in degrees
- speedMultiplier:
numberMultiplier 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'
})


Last updated on