The Score Cheat Code: How to Rig Your Fortnite Island with `SetScoreAward`
Unverified — this example may not compile as-is.
The Verse code below did not pass our automated compile check, so it isn't marked verified and is hidden from the guide listing. The explanation may still be useful, but treat the code as a draft and adapt it before use.
The Score Cheat Code: How to Rig Your Fortnite Island with SetScoreAward
Ever played a game where you kill a boss and get 10,000 XP, but your friend gets 50? It feels unfair, right? Or maybe you want to create a "Hard Mode" where every elim gives double points, or a "Chaos Mode" where hitting a specific trap gives you a million points instantly.
In Verse, the Score Manager device is the scoreboard of your island. But here’s the secret: by default, it just hands out points based on simple settings. SetScoreAward is your cheat code. It lets you override the default points and say, "No, this specific action is worth this amount right now."
We’re going to build a "Double Trouble" Switch. When you flip a switch, the next person to get an elimination gets double points. Flip it again, and it’s back to normal. It’s simple, it’s visual, and it teaches you how to manipulate game state dynamically.
What You'll Learn
- Variables: How to store a setting (like "Double Points: On/Off") that changes while the game is running.
SetScoreAward: The function that tells the Score Manager, "Hey, for the next point given, use this number instead of the default."- Logic Flow: How to connect a switch, check a value, and trigger a score event.
How It Works
Think of the Score Manager like a vending machine. Usually, it’s set to sell chips for $1.00 (100 points). If you want to sell them for $2.00 (200 points) just for the next customer, you don’t reprogram the whole machine. You just put a temporary sticker on the price tag.
In Verse:
- The Default: The Score Manager has a default point value (usually 100).
- The Override:
SetScoreAwardis that sticker. It doesn’t change the machine forever. It only changes the next activation. Once that point is awarded, the machine goes back to its default setting (unless you put another sticker on). - The Trigger: We need a way to decide when to put the sticker on. We’ll use a Switch. If the switch is "On," we tell the Score Manager: "Next activation? Give 200 points." If it’s "Off," we leave it alone (or set it back to 100).
Why not just change the Score Manager’s "Points Per Kill" setting directly?
You could, but that changes it for everyone, forever, until you change it again. SetScoreAward is precise. It’s like saying, "This specific kill counts for double," rather than "All kills from now on count for double." It’s cleaner, safer, and less likely to break your leaderboard.
Let's Build It
We need three things in your UEFN editor:
- Score Manager: The brain that tracks and awards points.
- Switch: The toggle to turn "Double Points" on or off.
- Trigger Volume: A zone where players get points when they elim someone (or just stand there for our demo). Note: For simplicity, we’ll use a Trigger Volume that awards points when a player enters it, simulating an "elim" or "objective" event.
The Verse Script
Copy this into a new Verse file in your project.
using { /Fortnite.com/Devices }
using { /Unreal.com/Devices }
# This is our main island script.
# Think of it as the "Game Director" that controls the rules.
double_trouble_island := class(verseworld):
# --- DEVICES ---
# These are the physical objects in your level.
ScoreManager: ScoreManagerDevice = ScoreManagerDevice{}
DoubleSwitch: SwitchDevice = SwitchDevice{}
PointTrigger: TriggerVolumeDevice = TriggerVolumeDevice{}
# --- VARIABLES ---
# A variable is like a scoreboard that only the script can see.
# It remembers if "Double Trouble" is currently active.
is_double_active: bool = false
# --- SETUP ---
# This runs once when the game starts.
on_begin<override>()<solved>:void=
# Make sure the switch starts in the "Off" position.
DoubleSwitch.SetState(false)
# Connect the trigger to our "on_player_entered" function.
# When someone steps into the trigger, run this code.
PointTrigger.OnActorEntered += on_player_entered
# --- THE LOGIC ---
# This function runs every time a player steps into the trigger.
on_player_entered := func(actor: actor):
# 1. Check the Switch State
# If the switch is ON, we want double points.
if (DoubleSwitch.GetState() == true):
is_double_active = true
else:
is_double_active = false
# 2. Decide the Points
# We use a simple math check. If active, 200. If not, 100.
points_to_award := 100
if (is_double_active):
points_to_award = 200
# 3. THE MAGIC SAUCE: SetScoreAward
# This tells the ScoreManager: "For the NEXT point you give,
# make it worth 'points_to_award' instead of the default."
ScoreManager.SetScoreAward(points_to_award)
# 4. Actually Give the Points
# We activate the ScoreManager with the player who entered.
# This awards the points we just set.
ScoreManager.Activate(actor)
# Optional: Print a message to the screen so the player knows what happened.
if (is_double_active):
PrintToPlayer(actor, "DOUBLE POINTS! +200")
else:
PrintToPlayer(actor, "Normal Points. +100")
Walkthrough: What Just Happened?
is_double_active: bool = false: We created a variable. In Fortnite terms, this is like a hidden flag on your player card. It starts asfalse(off).DoubleSwitch.GetState(): We check the physical switch in your level. If it’s flipped up, it returnstrue.ScoreManager.SetScoreAward(points_to_award): This is the core concept. We calculated200or100based on the switch. We passed that number toSetScoreAward. The Score Manager now knows: "Okay, next time someone gets points, give them 200."ScoreManager.Activate(actor): This is the "Go" button. It tells the Score Manager to actually perform the award. Because we calledSetScoreAwardright before this, the actor gets the custom amount.
Try It Yourself
Challenge: The "Triple Threat"
Right now, it’s just double points. Can you modify the script to add a third option?
- Add a second switch called
TripleSwitch. - If
TripleSwitchis ON, give 300 points. - If
DoubleSwitchis ON, give 200 points. - If neither is ON, give 100 points.
Hint: You’ll need to change the if logic. Think about the order of checks. Does it matter if you check Triple first or Double first? What if both are on?
Recap
SetScoreAwardlets you temporarily override the default point value for the next score event.- It’s perfect for power-ups, double-points modes, or dynamic scoring based on player actions.
- Always call
SetScoreAwardbeforeActivate. Think of it as setting the price before ringing up the sale. - Variables like
is_double_activehelp you remember the state of your game between events.
Now go rig your island. Make those points mean something.
References
- https://dev.epicgames.com/documentation/en-us/fortnite/verse-api/fortnitedotcom/devices/score_manager_device/setscoreaward
- https://dev.epicgames.com/documentation/fortnite/verse-api/fortnitedotcom/devices/score_manager_device/setscoreaward
- https://dev.epicgames.com/documentation/fortnite/verse-start-05-refactor-and-refine-in-fortnite
- https://dev.epicgames.com/documentation/fortnite/verse-start-02-timer-system-in-fortnite
- https://dev.epicgames.com/documentation/fortnite/verse-start-03-bonus-time-target-in-fortnite
Verse source files
- 01-standalone.verse · standalone
Turn this into a guided course
Add setscoreaward to your free study plan — we'll suggest related pages and stitch the lot into one compile-checked, self-guided lesson with worked examples and quizzes.
References
Original tutorial generated by Verse Island from the Verse/UEFN knowledge base, with references to the Epic Games sources above. Code is validated against the knowledge base.