Learn / Build Your First Game Lesson 3 / 6

Building a Score Tracking System

In this lesson you'll learn to

  • Explain what a variable is and why it changes during a game
  • Create a Verse script that tracks a player's score using a variable
  • Use a Trigger device to add points when a player does something in the game
  • Display score changes by connecting Verse logic to in-game devices

🎮 Let's Build a Score Tracker!

Imagine you are playing a Fall Guys obstacle course. Every time you finish a checkpoint, your score goes up. How does the game remember your score? That is exactly what we are going to learn today!


🧠 What is a Variable?

A variable is like a scoreboard in a gym. It holds a number (or other information), and that number can change while the game is running.

Think of it like this: imagine a whiteboard that says "Player Score: 0". When you tag a checkpoint, someone erases the 0 and writes 10. Then 20. That whiteboard is your variable!

  • The name on the whiteboard is the variable's name (like PlayerScore).
  • The number written on it is the variable's value.
  • The value can change anytime during the game.

💡 Variable = a named box that holds information and can be updated while the game runs.


🧊 What is a Constant?

A constant is like a painted wall in your island. You pick the color before the game starts, and it never changes during the game. Constants are set once and stay the same forever.

For example, the number of points each checkpoint gives you might always be 10. That never changes, so it can be a constant!

💡 Constant = a named box whose value is locked and never changes.


🏁 How This Works in a Fall Guys Island

Here is the plan for our mini-game:

  1. A player runs through a Trigger device (like stepping on a checkpoint).
  2. Our Verse code listens for that trigger.
  3. When it fires, the code adds 10 points to the player's score variable.
  4. The score is sent to a HUD Message device so the player can see it!

This is like a scoreboard that automatically updates every time something exciting happens in your game.


📦 The Devices We'll Use

Device What It Does
Trigger Device Fires an event when a player walks into it
HUD Message Device Shows a message (like a score) on screen

Both of these devices exist in UEFN's Creative device list. Place them on your island before writing code!


🔗 Connecting Verse to Devices

In Verse, we can reference (point to) a device we placed on our island. Think of it like naming a toy in your room. Once it has a name in your code, you can tell it what to do!

We use a special tag called @editable to connect a device in our code to a real device on the island. It is like labeling a box so you know exactly which toy is inside.

Keep going — free

You've read the intro. The rest of this lesson — the worked example, the hands-on exercise, the quiz, and the recap — is free for members. Sign in to continue and track your progress.

New here? The whole Verse Basics track is free with a free account — sign in to start.

Pass the quiz above to chart this quest in your Journal.
Source
Verse Island

© Biloxi Studios Inc. — original Verse Island content.

Sources & licensing

Turn this into a guided course

Add Building a Score Tracking System 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.

🧭 The Keeper's log

Quest complete? Chart your next heading from the Build Your First Game expedition.