Bullet problem. Too many of them

Get help using Construct 2

Post » Sat Aug 04, 2012 9:25 am

Hello guys,

I have weird problem with bullet object.
I basically have a rocket which should be shot when I hit spacebar from player's position.

So in conditions I have something like if spacebar then spawn bullet on player position. It works and bully is really shot. But the problem is that it shots like 4-5 rockets instead of 1? I dont understand why.

any tips? thank you
B
8
S
2
Posts: 45
Reputation: 1,168

Post » Sat Aug 04, 2012 10:48 am

It should be on key "pressed", not "down". Because it shoots bullet per tick, while the key is down.
B
45
S
11
G
4
Posts: 511
Reputation: 7,381

Post » Sat Aug 04, 2012 9:54 pm

True but even then the player could exploit it by tapping the space bar fast. You could put a limit on the time interval for another bullet to be fired. Maybe like a 0.5 delay.

On pressed fire then delay 0.5

B
22
S
5
G
3
Posts: 194
Reputation: 5,885

Post » Sun Aug 05, 2012 2:49 pm

thank you xoros :)

aarogamerx: Yes of course I know. I have already done that.
B
8
S
2
Posts: 45
Reputation: 1,168

Post » Sun Aug 05, 2012 6:24 pm

So is the problem solved?
B
37
S
11
G
6
Posts: 962
Reputation: 11,254

Post » Sun Aug 05, 2012 6:42 pm

yes it is
B
8
S
2
Posts: 45
Reputation: 1,168


Return to How do I....?

Who is online

Users browsing this forum: OddConfection, senna68, smlyldz and 12 guests