# First, we need to tell Verse where to find the Score Manager tools.
# Think of this like loading the "Creative Kit" into your inventory.
using { /Fortnite.com/Devices }
# This is our main script. It's like the blueprint for our rigged box.
rigged_loot_box := class(creative_actor):
# We need a reference to the Score Manager device.
# Think of this as plugging a cable from our box to the scoreboard.
score_manager: ScoreManagerDevice = create(ScoreManagerDevice)
# This is the "OnBegin" function. It runs once when the game starts.
# It’s like the "Loading Screen" phase where the game sets up the rules.
OnBegin<override>()<sided>:void=
# For now, we just start. In a real game, you might set initial scores here.
# This function runs when the trigger is activated (when a player steps in).
# 'player' is the person who stepped on the mat.
OnTriggered<override>(player: agent):void=
# Step 1: Check the player's current score.
# Think of this like looking at your own scoreboard before a match ends.
current_points := score_manager.GetCurrentScore(player)
# Step 2: Make a decision based on that number.
# If they have less than 50 points...
if (current_points < 50):
# ...set the next activation to award 50 points.
# This is like saying, "Give them a pity bonus."
score_manager.SetScoreAward(50)
else:
# ...otherwise, set it to award 10 points.
Verse Library
verse
01 Standalone
Adjusts score awards for players stepping on a trigger based on their current points.
verse-library/getscoreaward/01-standalone.verse
Sign in free to read the full source 🌴
This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.