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
42
S
11
G
4
Posts: 505
Reputation: 7,267

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,855

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
36
S
10
G
6
Posts: 948
Reputation: 11,101

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: mercuryus, Yahoo [Bot] and 13 guests