Accolades Device Preset Configuration
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
accolades_examples := class(creative_device):
# Reference to the in-editor accolades device
@editable
Accolades:accolades_device = accolades_device{}
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
Accolades.TestAwardEvent.Subscribe(AwardEventTriggered)
# Disables the Accolades Device
DisableAccolades():void=
Accolades.Disable()
# Enables the Accolades device
EnableAccolades():void=
Accolades.Enable()
# Awards XP to the agent passed
AwardXP(Agent:agent):void=
Accolades.Award(Agent)
# Signaled when testing the accolade to make sure it is awarded as expected. Only signals within unpublished island environments.
# Sends the `agent` receiving the achievement.
AwardEventTriggered(Agent:agent):void=
Print("A Player was awarded XP!")