Scroll Shooter Power Up

Get help using Construct 2

Post » Tue Apr 01, 2014 10:43 am

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?
B
3
Posts: 11
Reputation: 201

Post » Tue Apr 01, 2014 10:47 am

Post .capx?
B
2
G
1
Posts: 4
Reputation: 285

Post » Tue Apr 01, 2014 10:49 am

that's because once you are hitting the number it's always true, so you need to add to the number once reached

EnemyDeath = 5 Create Object (Sprite) on layer “Game” at (random(LayoutWidth) , random(LayoutHeight))
set enemy death to enemy death+5
Set Bullet speed to random(10, 80)
Set opacity to Self.Bullet.Speed
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,270


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests