# What is Global Number = 0 or 1?

Get help using Construct 2

### » Thu Mar 05, 2015 4:34 pm

A question regarding the Global Variable. What is actually the Global number xxxxx = 0 or 1 means in our game? Example:
Global number pause = 0
Global number record = 0
Global number avatar = 1
Global number sound = 1

Why we need to use 0 or 1?
B
12
S
5
G
4
Posts: 34
Reputation: 3,020

### » Thu Mar 05, 2015 4:36 pm

my guess would be that they means true or false, there are no global booleans in C2 (oversight IIRC) so people use generally 0 and 1 to represent it. for exemple pause = 0 could mean the game is not paused, and pause= 1 means the game is paused.

however, 1 or 0 are just a choice, it could be -1 and 1, or 0 and 2, that would work too in theory.

just my thinking of it.

also in conditionnal expressions, 0 means false and every other number seems to mean true, so there is possibly that too.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
42
S
17
G
17
Posts: 2,098
Reputation: 15,865