I created a scroll shooter and have been trying to edit in Power Ups, I am using a Global Variable (EnemyDeath) which counts amount of times an enemy has been killed in a single game time to increase difficulty, I want to use this variable to count when there are a certain amount of enemy deaths, send out a power up going horizontally. I already have this code so far.
EnemyDeath = 5 Create Object (Sprite) on layer “Game” at (random(LayoutWidth) , random(LayoutHeight))
Set Bullet speed to random(10, 80)
Set opacity to Self.Bullet.Speed
but when I play the game, the game spawns millions of power ups when I only want the one.
Is there a way I can use this to create a single moving power up or is there any other method?