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
64
S
39
G
45
Posts: 647
Reputation: 32,204

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
92
S
32
G
106
Posts: 5,272
Reputation: 69,455


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests