Nouns of Verse: Values and Types

In this lesson you'll learn to

  • βœ“Read and declare int/float/string/logic values and understand every type used in the rally code.

Read and declare int/float/string/logic values and understand every type used in the rally code.

πŸ“– Reference & full walkthrough: Nouns of Verse: Values and Types

🧩 Your capstone piece: Core literacy for every Jungle Mod-Rally script


Nouns: Values, Types, Variables & Constants

In Part 1 you learned the master sentence β€” Name : Type = Value β€” and in Part 2 you learned to read the shape that holds those sentences together. Now we slow right down and look hard at the nouns: the things you name in a game and the kinds they come in.

Every noun in Verse answers three questions, and they're the three parts of that sentence:

  • What do I call it? (the Name)
  • What kind of thing is it? (the Type)
  • What is it right now? (the Value)

Get comfortable with nouns and you've got half the language. Let's build them up from the smallest piece.

A value is just "a thing right now"

<!-- section-art:a-value-is-just-a-thing-right-now --> Nouns: Values, Types, Variables & Constants: A value is just "a thing right now"

Raw Values

A value is a single, specific thing: the number 5, the word "Victory Royale", the idea of true. Your shield being at 50, the storm phase being 3, a chest being open β€” each of those is a value at a moment in time. Values are the raw material; everything else is about naming them and saying what kind they are.

A type is the kind of thing a value is

A type is the category a value belongs to. This matters because Verse is strict in a way that protects you: a noun has one type, and you can only ever put values of that type into it. A health bar holds a number; you can't shove the word "banana" into it. That rule sounds annoying but it's a gift β€” it catches mistakes before the game ever runs, the same way the editor won't let you place a wall floating in mid-air.

Here are the everyday types you'll use constantly, each explained through something you already know from the game:

int β€” a whole number

An integer: a counting number with no decimal point. Eliminations, materials, the storm phase, lives remaining.

var Eliminations : int = 0
StormPhase : int = 1

"Eliminations is a whole number that may change, starting at 0. StormPhase is a whole number, starting at 1."

float β€” a number with a decimal point

A float is a number that can have a fractional part. Use it for things that aren't neatly whole: a timer counting 12.5 seconds, a distance, a damage multiplier.

RoundTime : float = 90.0
DamageMultiplier : float = 1.5

The .0 matters: 90 is an int, but 90.0 is a float. Different types, even though they look like "ninety" to us β€” like the difference between "3 chests" and "3.0 chests."

logic β€” true or false

A logic value is a yes/no, on/off, true/false. Is the round active? Is this player eliminated? Has the door been opened? In many languages this type is called "boolean"; in Verse it's logic.

var RoundActive : logic = false
var DoorOpen : logic = false

A logic can only ever be true or false β€” there's no in-between, just like a player is either knocked or not.

string β€” text

A string is a piece of text, written in double quotes. Player-facing messages, names, labels.

WinMessage : string = "Victory Royale!"

The quotes are how Verse knows it's text and not code. "Score" is the word Score; Score (no quotes) would be a noun named Score.

agent and devices β€” the game's own nouns

Now the types that make UEFN UEFN. An agent is "someone participating in the game" β€” most often a player. When something happens to or by a player, you'll see agent.

A device is one of the building blocks you drop into your map. Each device kind is its own type: button_device, trigger_device, teleporter_device, and so on. You met button_device in Part 1.

@editable
JumpPad : trigger_device = trigger_device{}

@editable
ExitDoor : teleporter_device = teleporter_device{}

Read the first one: "JumpPad is a trigger device, starting as a fresh trigger device." The @editable tag above it means you'll point it at a real device by clicking in the UEFN editor β€” the trigger_device{} is just a placeholder until you do. These are real device types straight from the Fortnite API; you don't invent device names, you pick from the ones the game gives you.

Variables vs constants: can it change during play?

This is the single most useful distinction about nouns, and Part 1 introduced it: some nouns change while you play, and some are decided once and locked.

  • A constant is decided once and never changes during the game. The score needed to win. The length of a round. The win message. Like a wall's color you set in the editor β€” fixed for the whole match.
  • A variable can change as the game runs. The current score. Whether the round is active. A player's remaining lives. Like the storm timer ticking down or your shield dropping when you're hit.

In Verse, the only difference in the sentence is one word: var. No var means constant. var means "this one is allowed to change."

# Constants β€” locked for the whole match
WinningScore : int = 10
RoundLength : float = 120.0

# Variables β€” change as you play
var CurrentScore : int = 0
var LivesLeft : int = 3

And when you do change a variable, you must say set β€” you can't just reassign it quietly. Changing state is a deliberate act, so Verse makes you spell it out:

set CurrentScore = CurrentScore + 1
set LivesLeft -= 1

"Set the current score to one more than it was. Set lives-left down by one." That set keyword is your signal β€” and the reader's signal β€” that the game's state just moved. (Quietly: changing state like this is exactly the kind of "side effect" that Part 4's <transacts> label is about. File that away.)

Containers: nouns that hold many values

So far each noun holds one value. But games are full of collections β€” all the players, every spawn point, each player's score. Verse gives you three container types for these.

[]type β€” an array, an ordered list

An array is an ordered list of values of the same type. The list of spawn pads. The leaderboard in order. Write the type as [] followed by what it holds:

var SpawnPads : []vector3 = array{}
PrizeTiers : []int = array{1000, 500, 250}

"PrizeTiers is a list of whole numbers: 1000, then 500, then 250." array{} is an empty list β€” nothing in it yet. (A vector3 is just a point in 3D space β€” an X/Y/Z spot in the world, like a map coordinate.)

[k]v β€” a map, a lookup table

A map pairs up keys with values, so you can look one up from the other β€” exactly like a leaderboard maps each player to their score. Write it as [KeyType]ValueType:

var ScoreByPlayer : [agent]int = map{}

"ScoreByPlayer is a map from each agent to a whole number, starting empty." Hand it a player, it hands you back their score. This is the bread-and-butter way to track per-player data β€” and notice the type itself reads like a sentence: agent in, int out.

?type β€” an option, "maybe there, maybe not"

An option is a value that might be there and might not β€” Verse's honest way of saying "no result." Think of opening a chest: maybe there's loot, maybe it's empty. When you ask a map for a player who isn't in it, you get back an option: maybe a score, maybe nothing.

var WinnerName : ?string = false

"WinnerName is maybe a string β€” right now it's false, meaning nobody's won yet." The point of an option is that Verse forces you to check before you use it, so you can never accidentally treat "nothing" as if it were a real value. You'll learn the exact checking move in Part 5; for now just know the ? means "handle the empty case."

Naming: the noun should read itself

<!-- section-art:naming-the-noun-should-read-itself --> Nouns: Values, Types, Variables & Constants: Naming: the noun should read itself

Naming Clarity

One last thing, and it's the rule that quietly makes everything else easier. Name a noun for what it actually is. Our project conventions are firm about this: names should convey purpose. var CurrentScore tells the whole story. var x tells nobody anything.

# Good β€” the sentence reads itself
var PlayersRemaining : int = 0
var IsFinalCircle : logic = false

# Bad β€” what even is this?
var n : int = 0
var flag : logic = false

When your nouns are named well, you barely need comments β€” the code says what it is. And a well-named noun is the thing that lets you direct a helper precisely: "make a map called ScoreByPlayer from agent to int" is an instruction any human or AI can follow exactly, because every word is doing real work.

Quick recap

  • A value is a thing right now; a type is the kind of thing it is; the name is what you call it.
  • Everyday types: int (whole number), float (decimal number), logic (true/false), string (text), agent (a player), and device types like button_device / trigger_device.
  • var = a variable (changes during play); no var = a constant. Use set to change a variable.
  • Containers: []type is an ordered array, [k]v is a map (lookup table), ?type is an option (maybe-there value you must check).
  • Name nouns for what they are β€” the sentence should read itself.

Next: Part 4 β€” Verbs: Functions, Events & Effects, where the nouns finally start doing things.

References

πŸ”’

Keep going β€” free

You've read the intro. The rest of this lesson is free for members. Sign in to continue and track your progress.

Sign in free to continue this lesson
Pass the quiz above to chart this quest in your Journal.

Sources

/guides/verse-nouns-values-and-types
Source

Biloxi Studios original lesson

Guided course

Add this lesson to your free study plan.

🧭 The Keeper’s log

Quest complete? Chart your next heading from the 🐻 North Jungle expedition.

β›΅ Take me there