*SOLVED*How do I Create Spear With Line Of Sight

Get help using Construct 2

Post » Thu Dec 11, 2014 7:38 pm

In my game i have spears that should be created when the player gets within X amount of pixels away but i can't seem to figure out how to get them spawned.

The spears should spawn at TUBE1 & destroy on collision with TUBE2 or the player. I've tried using LOS on the tube1 and the spear, neither work. Possibly due to the fact there are SOLID block between them, I don't know. I've also tried using "is on screen" with tube1 to spawn the spear but no luck.

How can i spawn the spear if the player gets X amount of distance away and there are solids between them and the spear?

Thanks for any help
Last edited by jeffige on Fri Dec 12, 2014 2:39 am, edited 1 time in total.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Thu Dec 11, 2014 7:45 pm

How about a simple distance check ? You will have to use a "for each spear" though to use the distance() function.
B
67
S
28
G
24
Posts: 970
Reputation: 18,675

Post » Fri Dec 12, 2014 2:40 am

Hey thanks for the reply.

I figured it out after a while. I had to "clear obstacles" from LOS
B
38
S
18
G
19
Posts: 664
Reputation: 14,107


Return to How do I....?

Who is online

Users browsing this forum: Fradno, lolsuperscratch, RobertMKD, tarek2 and 9 guests