accolades_device

device
accolades_device<public> := class<concrete><final>(creative_device_base)

Used to set up islands so players will earn Battle Pass XP when they interact with your island. Accolades are achievements or accomplishments that players can complete to earn XP.

Module
/Fortnite.com/Devices
Source
fortnite

Used in

SlayerChallenge := class(creative_device):
    # These are references to the devices we placed in the editor.
    # Think of these as "wires" we’ll connect in the editor.
    Tracker: tracker_device = tracker_device{}
    Accolades: accolades_device = accolades_device{}

    # This function runs when the game starts.
    OnBegin<override>()<suspends>: void=
        # We need to listen for when the Tracker hits its goal.
        # The Tracker emits an event called 'GoalReached' on a specific channel.
        # We'll use Channel 1 for this challenge.
        
        # Subscribe to the Tracker's GoalReached event.
        # When the tracker hits 3 kills, this lambda (anonymous function) runs.
        Tracker.GoalReached.Subscribe(
            func(player: player, channel: int): void=
                # Check if the signal came from our specific channel (Channel 1)
                if channel == 1:
                    # Award the accolade to the player who triggered it.
                    # This is where the XP gets handed out.
                    Accolades.Award(player, "Slayer of Ice")
        )
# Think of them as tools in your toolbox.
    @editable
    VictoryTrigger : trigger_device = trigger_device{}
    @editable
    ItemGranter : item_granter_device = item_granter_device{}
    @editable
    Accolades : accolades_device = accolades_device{}

    # This runs when the game starts.
    OnBegin<override>()<suspends> : void =
        # Wait for the player to step on the trigger.
        # This is like waiting for a bell to ring.
        loop:
GamePlay / Checkpoint Device verse-source
# Audio player for unlock sound
    @editable
    UnlockSound : audio_player_device = audio_player_device{}

    # Accolades device for awarding XP
    @editable
    AccoladesFirstPlayer : accolades_device = accolades_device{}

    # Accolades device for awarding XP
    @editable
    AccoladesOtherPlayers : accolades_device = accolades_device{}

    # Score manager device for awarding points
PlantSystem / Player Farming Progression verse-source
# Persistent player data storage
    @editable
    PlayerDataDevice<public> : persistent_storage_device = persistent_storage_device{}
    
    # Experience granting device
    @editable
    XPDevice<public> : accolades_device = accolades_device{}
    
    # Game constants
    XPPerLevel : int = 1000
    MaxLevel : int = 10

    # Initialize the progression system