I'm developing a top-down space shooter, and I have a mechanic in which when the player's "Score" variable reaches 10, it spawns one new enemy type and keeps spawning when one is killed.
I have done this by creating a variable called "UFOSpawn" which by default is set to 0, and sets to 1 when the players score reaches 10. When said variable is set to 1, the system will spawn the enemy type. If on
I have done this using the following method:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Creating a variable called "UFOSpawn", default value 0.
System>Score=10>Set "UFOSpawn" to 1
[GROUP "UFOSpawn":]
[System>Group "UFOSpawn" = Active>Create object UFO on Layer 1 at random]
System>UFOSpawn = 1>Set Group "UFOSpawn" Activated
System>UFOSpawn < 1>Set Group "UFOSpawn" Deactivated
UFO On created>Set UFOSpawn to 0
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
When I run the layout, for some reason one UFO object spawns in a random location even when Score = 0.
What am I doing wrong?