GBX.lua.BadgeService (Service): Difference between revisions
From Goodblox Wiki
Jump to navigationJump to search
(created the page) |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{CatUp|Class reference}} | {{CatUp|Class reference}} | ||
{{Service}} | {{Service}} | ||
The BadgeService runs in a place to handle badges. When a player meets a certain requirement the AwardBadge function can be called to give that player a badge. You can also check to see if a player has won a previous badge, even if it is not one of your badges. | The BadgeService runs in a place to handle badges. When a player meets a certain requirement the AwardBadge function can be called to give that player a badge. You can also check to see if a player has won a previous badge, even if it is not one of your badges. | ||
Line 31: | Line 30: | ||
[[Category: GoodBlox Lua Objects]] | [[Category: GoodBlox Lua Objects]] | ||
[[Category: GoodBlox Lua Services]] |
Latest revision as of 19:58, 23 September 2021
Note: This is a Game Service, and therefore isn't like other Objects in the Class Explorer. You have to call it with :
game:GetService("<Service name>")
The BadgeService runs in a place to handle badges. When a player meets a certain requirement the AwardBadge function can be called to give that player a badge. You can also check to see if a player has won a previous badge, even if it is not one of your badges.
Tips and Tricks
The UserHasBadge method can be really useful. It can be used for saving data. You can use it to make a Gui Badge checker which will show if they have a badge or not. Really helpful with badge hunts.
Functions
In addition to the Global functions, the BadgeService also has these:
# indicates a locked function. These should NOT be tampered with.
- AwardBadge
- IsDisabled
- IsLegal
- # SetHasBadgeCooldown
- # SetPlaceId
- # SetAwardBadgeUrl
- # SetHasBadgeUrl
- # SetIsBadgeDisabledUrl
- # SetIsBadgeLegalUrl
- UserHasBadge
Properties
The BadgeService only incorporates global properties.
Events
The BadgeService only incorporates global events.