How do I make dotted line of "aiming target" sample attached

Get help using Construct 2

Post » Fri Mar 25, 2016 11:55 am

i want to do something like this but how ???? pls help me
Image
https://www.dropbox.com/s/gi6kndrh8bfpw ... e.jpg?dl=0
.
capx attached
https://www.dropbox.com/s/woxx731vwzqud ... .capx?dl=0
Image
B
72
S
42
G
48
Posts: 688
Reputation: 34,392

Post » Fri Mar 25, 2016 6:40 pm

I didn't look at your capx, but here's on possibility:
span-class-posthilit-reflecting-span-span-class-posthilit-laser-spa_p560745?#p560745

Basically the first step is do a laser. Here used a sprite that is stretched from the gun to the wall. Then a new laser is created at the end and it's angle is set to the reflecting angle. In the link the direction is stored as a x difference and a y difference, then to bounce against a vertical wall the dx is negated. In a similar way horizontal walls are handled. The actual angle can be calculated with the angle expression.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853


Return to How do I....?

Who is online

Users browsing this forum: zenox98 and 33 guests