Want to grant players Battle Pass XP while they play your UEFN experience? This tutorial shows you how to use the Accolade device to grant XP to players through UEFN and Verse.
For more information on how this device grants players XP, see Accolade Devices for Fortnite Creative.
Awarding XP for Zombie Eliminations
Launch UEFN from the Epic Game Store.
Create a new island or load an existing island.
In the Content Browser, navigate to All > Fortnite > Devices and search for "accolade".
Drag the Accolade device into your level.
Make sure the Accolade device is selected.
In the Details panel, modify the following User Options:
Option Value Explanation Name
"Zombie Elimination"
A brief message to explain the type of award.
XP Award
Very Small
Since this is an easy to achieve goal, the award should be small.
Splash Size
Small
The message on the player’s screen will take up a small amount of space.
In the Content Browser, navigate to All > Fortnite > Devices and search for "creature spawn".
Drag a Creature Spawner into your level.
Find and drag a Mounted Turret device into your level, within range of the creature spawner. This will allow players to eliminate the zombies.
Direct Event Binding
You can use direct event binding to trigger the Accolade device whenever a zombie is eliminated. This workflow is performed in the editor only. To see how this is done in Verse, go to Awarding XP Using Verse.
Select the Accolade device created earlier.
From the Details panel, scroll to the User Options - Functions section.
Click the + button next to "Award".
Click the dropdown, search for the creature spawner and select it.
Click the second dropdown and select "On A Creature Is Eliminated".
Awarding XP for Time Spent In-Game
Repeat steps 1 through 5 listed in the zombie eliminations example.
In the Details panel, modify the following settings:
Option Value Explanation Name
"Thanks for Playing!"
Write a brief message to explain the type of award.
Description
"A thank you for spending time on the island."
Write a short message to explain why the player is getting an XP award.
XP Award
Large
15 minutes of playtime could warrant a large award.
Limit Award Count
True, "1"
This XP award can only be granted once.
Icon
Choose two
Search for "Star", then set the small icon to the “_64” version and the large icon to the “_128” version.
Find the Timer device in the Content Browser and drag into your level.
In the Details panel for the Timer device, modify the following settings:
Option Value Explanation Duration
900
The award will be granted after 15 minutes of gameplay.
Start at Game Start
True
The timer will commence automatically when the game begins.
Completion Behavior
Restart
The timer will restart and grant more XP at the end of the next 15-minute segment.
Visible During Game
Hidden
You cannot see or interact with this timer.
Direct Event Binding
Use direct event binding to trigger the Accolade device whenever the timer completes.
Select the Accolade device created earlier.
From the Details panel, scroll to the User Options - Functions section.
Click the + button next to "Award".
Click the dropdown, search for the Timer device and select it.
Click the second dropdown and select "On Success".
Awarding XP Using Verse
This example builds on the zombie elimination example above. Zombies drop bones that can be picked up. The following section shows how to award a large amount of XP whenever a player submits 5 bones.
From the Content Browser, navigate to All > Fortnite > Devices and search for "elimination".
Drag an Elimination Manager device into your scene.
From the Details panel, under User Options:
Click Add Element to Item List.
Open Index 0. In Pickup to Spawn, click the object picker dropdown.
Search for "Animal Bones". Now the enemies that are eliminated will drop animal bones.
Drag another Accolade device into your scene.
From the Details panel of the new Accolade device:
Set the Name to "Zombie Bounty".
Set the XP Award to Very Large.
Set the Splash Size to Large.
Search for "conditional" in the Content Browser.
Drag a Conditional Button device into your scene.
From the Details panel of the new Conditional Button device:
Enable Key Item Required and set the number to 5 on the same line.
Find Key Item 1 and expand the options.
On the Item Definition property, click the dropdown.
Search for "Animal Bones".
Select the "Animal Bone" object.
Creating the Verse Script
Create a new Verse device named accolade_example using Verse Explorer, and drag the device into the level. To learn how to create a new device in Verse, see Create Your Own Device Using Verse.
Open Verse Explorer and double-click accolade_example.verse to open the script in Visual Studio Code.
In the
accolade_example
class definition, add the following fields.An editable accolades device named
Accolades
, which references your accolades device in the level.An editable conditional button named
ConditionalButton
. You’ll use this to award points to the player when they submit the required number of bones.Verseaccolade_example := class(creative_device): @editable Accolades:accolades_device = accolades_device{} @editable ConditionalButton:conditional_button_device = conditional_button_device{}
In
OnBegin()
, subscribe theConditionalButton
ActivatedEvent
to a new function namedBountyComplete
.VerseOnBegin<override>()<suspends>:void= ConditionalButton.ActivatedEvent.Subscribe(BountyComplete)
Add the new method
BountyComplete()
to theaccolade
class. This method awards the player who activated theConditionalButton
with theAccolades
score.Verse# Awards score to the player who activated # the ConditionalButton BountyComplete(Agent:agent):void= Accolades.Award(Agent)
Your
accolade_example
code should now look like:Verseusing { /Fortnite.com/Devices } using { /Verse.org/Simulation } using { /UnrealEngine.com/Temporary/Diagnostics } accolade_example := class(creative_device): @editable Accolades:accolades_device = accolades_device{} @editable
Save the script in Visual Studio Code, and in the Main Menu, under Verse, click Build Verse Code to compile your code. If errors are discovered, you can find them in the Message Log panel under the Verse Build section.
Navigate to <ProjectName> Content > Creative Devices, find your Verse device, and drag it into your scene.
With the Verse device selected, in the Details panel, assign the object reference for the Accolade device and the Conditional Button device. You can use the eyedropper to pick the object in the viewport, or use the dropdown and search for the device.
Playtesting Your Island
Once everything is set up and ready to go, playtest your island to make sure that it runs as expected in Fortnite.
When playing your level, you should see boilerplate debug text on the screen that tells you when the accolade device is activated and awarding XP.
This is what happens when you eliminate zombies.
This is what happens when you cash in 5 bone parts.
Publishing Your Island
To Publish your island, see Publishing Projects.
After your island’s calibration period completes, you should be able to play your game and see XP awards.