How do I check line of sight with image point ?

Get help using Construct 2

Post » Tue Jul 11, 2017 8:02 pm

Hi .
Is there any way to check the line of sight by image point ?
I try a event like this :
For each Soldier
pick Building by comparison : distance(building.imagepointX(1), building.imagepointY(1),Soldier.X,Soldier.Y)<60)
-----------------------------
but it has lower performance than line of sight behavior .
What should i do ?
B
18
S
8
G
2
Posts: 48
Reputation: 2,504

Post » Tue Jul 11, 2017 9:23 pm

A simple workaround would be to use a very tiny Sprite that gets pinned to the Image Point (download link for behavior: here) and then check the line of sight to that Sprite.
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091


Return to How do I....?

Who is online

Users browsing this forum: AndreasR, blackhornet and 12 guests