How do I make a laser

Get help using Construct 2

Post » Wed Apr 13, 2016 4:52 pm

Message: ElChuchis can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hello guys! I am making a 2d top down view space simulator game, and i need a laser canon. But i have no idea how to make it.

Example:

https://gyazo.com/f8d6e0bd42cc1cb83d8249ec3f2d7576

Thanks youu all!
B
14
S
6
Posts: 63
Reputation: 1,236

Post » Wed Apr 13, 2016 5:07 pm

Here you go (with a understandable commented source): https://www.scirra.com/tutorials/902/li ... raycasting ;-)
B
24
S
14
G
9
Posts: 118
Reputation: 6,799

Post » Wed Apr 13, 2016 6:46 pm

There are other way to do this without arrays... ?
B
14
S
6
Posts: 63
Reputation: 1,236

Post » Wed Apr 13, 2016 7:02 pm

Yes, lots. A search for laser will give a lot of examples.

Here's a recent one I did:
reflecting-laser-beams-off-surfaces_p1028214?#p1028214
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Post » Wed Apr 13, 2016 8:28 pm

R0J0hound wrote:Yes, lots. A search for laser will give a lot of examples.

Here's a recent one I did:
reflecting-laser-beams-off-surfaces_p1028214?#p1028214


Can you save this example for old versions like 208... pls :(

EDIT: I managed to open it. Thanks youu nicee laserr reflections :o
B
14
S
6
Posts: 63
Reputation: 1,236

Post » Wed Apr 13, 2016 9:09 pm

I also made laser guide with bouncing angle:
viewtopic.php?t=164607
ImageImage
B
105
S
46
G
23
Posts: 778
Reputation: 22,226

Post » Thu Apr 14, 2016 7:33 am

ElChuchis wrote:
R0J0hound wrote:Yes, lots. A search for laser will give a lot of examples.

Here's a recent one I did:
reflecting-laser-beams-off-surfaces_p1028214?#p1028214


Can you save this example for old versions like 208... pls :(

EDIT: I managed to open it. Thanks youu nicee laserr reflections :o


Why on Earth would you still be using such an old version?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
84
Posts: 5,374
Reputation: 58,430

Post » Fri Apr 15, 2016 1:41 pm

Message: ElChuchis can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
alextro wrote:I also made laser guide with bouncing angle:
viewtopic.php?t=164607



Thanks you Alex, I will use your code for my project!! :mrgreen: But how can I edit it for make the laser ray have X distance (width)

CODE:
https://gyazo.com/ab018ab7a7cc17003e125ad08dc8eb07

Result:
https://gyazo.com/ab14dc93df658d7eada7dc7c9af3af2b
B
14
S
6
Posts: 63
Reputation: 1,236

Post » Fri Apr 15, 2016 7:34 pm

You mean the length of laser, not the width of laser beam right?
ImageImage
B
105
S
46
G
23
Posts: 778
Reputation: 22,226

Post » Fri Apr 15, 2016 8:39 pm

alextro wrote:You mean the length of laser, not the width of laser beam right?


Suree! Sorry about my english
B
14
S
6
Posts: 63
Reputation: 1,236

Next

Return to How do I....?

Who is online

Users browsing this forum: JoyfulDreamer, newt, StillSarah and 20 guests