How do I Bounce lasers off walls like in R-type

Get help using Construct 2

Post » Sat Apr 01, 2017 9:11 pm

I've had a good look around the forums but the dropbox links for this type of question are all too old and don't work. I'm trying to create the laser bouncing effect as seen in the game R-Type. Lots of youtube videos on this great game. If I was using a small sprite the bullet behavior would work fine, but the lasers need to be quite long, this causes the bounce to be inaccurate.

When the fire button is pressed lasers are spawned and travel at different angles, they continue to grow in length as they leave the spawn point and bounce off every object whilst leaving the trail of where it had previously bounced.
Good example in the youtube video below at 2:30
https://www.youtube.com/watch?v=9qXHicrtLJU&t=126s

Anyone know hot to create this?
B
4
Posts: 10
Reputation: 220

Post » Sun Apr 02, 2017 8:15 am

check out the bouncing bullets template that comes with construct 2 that will help you
Image
B
20
S
10
G
10
Posts: 229
Reputation: 7,624

Post » Sun Apr 02, 2017 11:38 am

I had a go at this for you, but I think I can't post links because I'm new, so not sure if this will work. Try this:

dropbox.com/s/gi7vdjf2xbuedys/rtype%20beam.capx?dl=0
B
13
S
3
Posts: 28
Reputation: 781

Post » Sun Apr 02, 2017 6:47 pm

Thanks for the help guys. @LukeW your capx is just what I was looking for thanks!
B
4
Posts: 10
Reputation: 220

Post » Mon Apr 03, 2017 1:05 am

No worries.

Just had a thought with that capX though, as soon as you start adding ship movement, the beam will break as it's a series of overlapping minisprites.

Should be an easy fix though. What I would suggest is an invisible sprite with a timer set to it that spawns the beam. so when you shoot, an instance is created at the ship, that instance spawns the beam until the timer runs out, then is destroyed.

That way, you can shoot and move away and the beam will continue to fire from a single point.
B
13
S
3
Posts: 28
Reputation: 781

Post » Mon Apr 03, 2017 9:24 pm

Good tip, I'll implement that, cheers!
B
4
Posts: 10
Reputation: 220


Return to How do I....?

Who is online

Users browsing this forum: alextro, stevenode, Yahoo [Bot] and 3 guests