let's say the global variable was set to 0 a corresponding sprite is supposed to spawn.
You should have an action following it.
Like if time = 0, touch/click will create a sprite.
Unless you want it will be spawned continuously.
Develop games in your browser. Powerful, performant & highly capable.
What if i have a global variable that has a random number set to it. number 0-3 and each number has a corresponding sprite or character that should spawn when the global variable is one of those numbers?
Of course, you can set the conditions
variable = 0 => Spawn sprite A
variable = 1 => Spawn sprite B
variable = 2 => Spawn sprite C
variable = 3 => Spawn sprite D