Score Keeper: Track Points in Your Island
Tutorial beginner

Score Keeper: Track Points in Your Island

Updated beginner

Score Keeper: Track Points in Your Island

Do you want to know who wins your game? The Score Manager device is like a referee with a clipboard. It keeps track of points for each player. You can use it to see who has the most points at the end. Let’s build a simple point-tracking system together.

What You'll Learn

  • How to use the Score Manager device.
  • How to give points when a player does something.
  • How to check who is winning.
  • How to write a tiny Verse script to make it work.

How It Works

Think of a scoreboard like a video game console. It remembers your high score. The Score Manager device does the same thing. It stores a number for each player. This number is their score.

A variable is a box that holds a changing value. Your score is a variable. It starts at zero. It goes up when you do good things.

We will use a trigger. A trigger is like a pressure plate. When a player steps on it, something happens. We will connect the trigger to the Score Manager. When the player steps on the trigger, the Score Manager adds points.

We also need a team. Teams help us track scores for groups. We will give one point to Team 1. We will give two points to Team 2. This makes the game fair and fun.

Let's Build It

We will build a simple game. There are two buttons. One button gives points to Team 1. The other gives points to Team 2. We will use Verse to make the buttons work.

First, place two Team Switches in your island. Name one "Team 1 Button" and the other "Team 2 Button". Place a Score Manager device nearby. Name it "Main Scoreboard".

Now, let’s write the Verse code. This code tells the Score Manager what to do.

# This is a simple Verse script for scoring
# It uses the Score Manager device

# We need to find our Score Manager device
# This is like finding a specific toy in a box
my_score_manager := ScoreManager{}

# This function runs when the game starts
# It sets up the rules for our game
OnBegin<override>()<suspends>:void=>
    # We do not need to do anything yet
    # But we are ready to score!
    pass

# This function adds points to a team
# It is like a helper robot
AddPoints(team_index: int, points: int): void =>
    # This line gives points to the team
    # It uses the Score Manager we found earlier
    my_score_manager.AddScore(team_index, points)
    
    # This line prints a message to the screen
    # It helps us see what is happening
    print("Team ", team_index, " got ", points, " points!")

Here is how to connect it. You need to use channels. Channels are like phone lines. Device A sends a message on channel 1. Device B listens on channel 1.

  1. Select "Team 1 Button". Set its Activate When Receiving From to channel 1.
  2. Select "Team 2 Button". Set its Activate When Receiving From to channel 2.
  3. Select "Main Scoreboard". Set its Activate When Receiving From to channels 1 and 2.
  4. Set the Score Value on the Score Manager to 1.
  5. In Verse, call AddPoints(1, 1) when channel 1 fires. Call AddPoints(2, 2) when channel 2 fires.

This code makes the scoring automatic. Players just press the buttons. The score goes up. It is easy to play!

Try It Yourself

Can you make a third button? This button should give 5 points to Team 1. Try adding a new function called BigPoints(). Make it call AddPoints(1, 5). Then connect a new Team Switch to channel 3. Test it out!

Hint: You can copy the AddPoints function. Just change the numbers inside the parentheses.

Recap

The Score Manager device tracks points for players. It is like a digital scoreboard. You use triggers to start the scoring. Verse helps you control the rules. Now you can make your own point games!

References

  • https://dev.epicgames.com/documentation/en-us/fortnite/party-game-4-reusable-game-manager-in-unreal-editor-for-fortnite
  • https://dev.epicgames.com/documentation/en-us/fortnite-creative/dungeon-crawler-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite/dungeon-crawler-gameplay-example-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite/using-score-manager-devices-in-fortnite-creative
  • https://dev.epicgames.com/documentation/en-us/fortnite/prop-hunt-09-configuring-the-informative-devices-in-unreal-editor-for-fortnite

Verse source files

Turn this into a guided course

Add Using the score manager device to track points 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.

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.

Comments

    Sign in to vote, comment, or suggest an edit. Sign in