Create your coin collection variable

A variable is storage space in a program that holds data, like a number or word, that can change.

To create your own coin collection variable you can either edit a prewritten variable code or create your own variable code from scratch. 

Flock XR code for creating a coinFound variable that starts false and turns true on collision with the player
A blue, green and a pink cute Flock XR bird
The Flock XR canvas with a character saying "5 hearts" and 5 heart objects

Did you know?

Games often use variables to trigger rewards like gaining an extra life level when your hearts variable reaches 10.

Career spotlight: Video game programmer

A programmer writes the code that controls the game. They might program the entire game or focus on one part like gameplay, graphics, or physics. They test their code to make sure the game runs smoothly.

A photo of programmer with code for decorative purposes