builtin achievement - boyism80/fb GitHub Wiki
Built-in Functions Documentation (Achievement)
This document describes functions available to achievement type objects.
model
model()
- Description:
Returns the model object (fb.model.achievement
) that the achievement object references. - Parameters:
- None
- Return Value:
fb.model.achievement
: Achievement model object
- Example:
-- This is a real usage example from game scripts local model = achievement:model() me:message("Achievement: " .. model:name())
text
text()
- Description:
Returns the text of the achievement. If there is custom text set on the achievement object, returns that; otherwise returns the model's default text. - Parameters:
- None
- Return Value:
string
: Achievement text (custom text or model text)
- Example:
-- This is a real usage example from game scripts local text = achievement:text() me:message("Achievement: " .. text)