Using a Scene Variable in a Timer

I’m making a version of the Space Shooter Tutorial and have managed to get Meteors spawning randomly using a timer.
When the game starts I have a scene variable called “Difficulty” set to 5.
I want to use this stored variable value in a Timer that spawns the meteors (Every 5 seconds to start), and therefore be able to change it to spawn more frequently.
As soon as I introduced “Variable(Difficulty)” in the timer, it just spawns hundreds of meteors. (If I simply change the value to 5, it works fine).

Any help would be greatly appreciated.

You have quotes in the variable name in your first event. Variables cannot include special characters. They won’t generate at all (or will error out).

Thank you, I can’t believe I missed that.

2 Likes