Project: a welcome sign device

Time to combine everything from Module 1 into one small, real device. You'll build a welcome sign that, when the island starts, prints a friendly announcement plus a few stats — using a constant and a variable, and every type you've met.

This is a project. Build it in UEFN, get it printing in the log, then come back and mark it complete. Aim to type it yourself rather than copy-paste — that's where it sticks.

The goal

When your island starts, the Output Log should show something like:

=== Welcome to Coin Rush! ===
Up to 4 players · difficulty 1.5
Visitors so far: 1

Step 1 — Make a new Verse device

Same recipe as lesson 1:

  1. Verse → create a new Verse file, named welcome_sign.
  2. It opens with the starter creative_device template.

Step 2 — Declare your values

Inside OnBegin, declare a value of each type. Mix constants and a variable:

    OnBegin<override>()<suspends>:void=
        # Constants — these never change
        IslandName := "Coin Rush"      # string
        MaxPlayers := 4                # int
        Difficulty := 1.5              # float
        IsRanked := false              # logic (stored for later use)

        # A variable — this one we'll change
        var VisitorCount : int = 0

Step 3 — Update the variable and print

Bump the visitor count, then print your announcement using string interpolation:

        set VisitorCount = VisitorCount + 1

        Print("=== Welcome to {IslandName}! ===")
        Print("Up to {MaxPlayers} players · difficulty {Difficulty}")
        Print("Visitors so far: {VisitorCount}")

Step 4 — Build, place, run

  1. Verse → Build Verse Code (Ctrl+Shift+B). Fix any errors it points to.
  2. Find welcome_sign in the Content Browser and drag it into your level.
  3. Launch Session, open the Output Log, and read your sign's output. 🎉

Checklist

  • Created a welcome_sign Verse device
  • Declared a string, int, float, and logic value
  • Used at least one constant (:=) and one variable (var + set)
  • Changed the variable with set
  • Printed all of it using { } interpolation and saw it in the log

Make it yours (optional)

Pick one and try it — experimenting is how you learn:

  • Change IslandName and the numbers to describe your island.
  • Add a second variable, like var SecretsFound : int = 0, bump it twice, and print it.
  • Compute something in the print: Print("Half the players is {MaxPlayers / 2}") — does it build? What does the result look like? (This previews why division is its own topic.)

Why IsRanked just sits there

You stored a logic value but never printed or used it — that's fine and intentional. Logic values exist to drive decisions: "if ranked, do this; otherwise do that." That if is exactly where Module 2 begins.


That's Module 1 complete — you've written real Verse, made your own devices, and handled values and types. Mark this done, and you're ready to make your code start making choices.