How do I implement this simple race with bullet?

Get help using Construct 2

Post » Wed Apr 15, 2015 2:40 pm

I would like to make a simple race game that forces the user to tap the screen (this is for touch) to make the sprite move to the right horizontally. This is why I assumed bullets would be the way to go. The tapping would be what controlled the speed the sprite. The user doesn't control where the sprite goes, just how fast.

Anyone have a fairly simple solution? I'm having trouble wrapping my head around it for some reason. :?
B
10
S
5
G
4
Posts: 23
Reputation: 2,923

Post » Wed Apr 15, 2015 2:44 pm

Something like this?

te decelerate the bullet when player doesn't touch the screen:
every x seconds subtract a number from the bullet speed

Tapping on the screen adds to the bullet velocity:
on tap add a certain number to the bullet speed
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Apr 15, 2015 3:38 pm

I must be being an absolute putz here because I just kinda get a bouncing bullet. I've tried it with different numbers. I've been messing with it but kinda end up with the same thing. I took a screen cap.

Image


and this

Image
B
10
S
5
G
4
Posts: 23
Reputation: 2,923

Post » Wed Apr 15, 2015 3:43 pm

you are setting the speed instead of increasing and decreasing it.
Try this:

sprite set bullet speed to Sprite.Bullet.Speed+25

sprite set bullet speed to Sprite.Bullet.Speed-20
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Apr 15, 2015 4:07 pm

Ahh! Now I gotcha. Now the horse flips direction and turns around and runs back the other way if you don't keep clicking and that works for me. I can kick them to a "disqualified screen" based on the horses direction. So I this works great. I kinda see what I need to learn more about now. Thanks to much Little. I really appreciate your help.
B
10
S
5
G
4
Posts: 23
Reputation: 2,923


Return to How do I....?

Who is online

Users browsing this forum: chrislechat, Darknessed, Google [Bot], ismael123 and 9 guests