Line of Sight Behavior as Tripwire

Get help using Construct 2

Post » Tue Mar 18, 2014 1:12 am

I'm trying to use the line of sight behavior to alert a sprite when it is within a certain distance of another sprite. Unfortunately I cannot get it to work.

I am currently using "System-For Each" to cycle through every instance of an object. I am then checking to see if that object has line of sight to a family of other objects. If it does, both object are destroyed.

The Obstacles setting for the object with the line of sight behavior is set to "Custom", but I haven't seen a difference between that and selecting "Solids".

My project is at an impasse until I get this figured out, so any help would be greatly appreciated.
B
5
Posts: 11
Reputation: 272

Post » Tue Mar 18, 2014 1:36 am

check this .capx =)
here is my original post about this in case you want to check it out

how-do-i-flip-line-of-sight_t99726

here is a way to manage the picking beetween instances
You do not have the required permissions to view the files attached to this post.
B
23
S
6
G
3
Posts: 316
Reputation: 3,461

Post » Tue Mar 18, 2014 2:26 am

Thanks for the quick reply. Unfortunately, I'm unable to open your capx. Construct is saying that your file is from version 164.2 while I'm using 163. I purchased via Steam, so maybe that has something to do with it. I'm sure I'll get upgraded at some point.

Maybe you can answer a question for me though. Is LOS layer dependent; will it work for objects that are on different layers?

Also, here is a screenshot of the code I'm currently using:
Image

Do you see anything obviously wrong about it?
B
5
Posts: 11
Reputation: 272

Post » Tue Mar 18, 2014 2:44 am

reggie3 wrote:Thanks for the quick reply. Unfortunately, I'm unable to open your capx. Construct is saying that your file is from version 164.2 while I'm using 163. I purchased via Steam, so maybe that has something to do with it. I'm sure I'll get upgraded at some point.

Maybe you can answer a question for me though. Is LOS layer dependent; will it work for objects that are on different layers?

Also, here is a screenshot of the code I'm currently using:
Image

Do you see anything obviously wrong about it?


try installing the beta of construct... go to steam, go to construct rigth clikc and in properties, go to betas and set it like you want to use beta versions... its really hard to tell just from 1 image...

either
installl c2 beta to open my example or post a .capx to check it out...

:)
B
23
S
6
G
3
Posts: 316
Reputation: 3,461

Post » Thu Mar 20, 2014 12:56 pm

Message: reggie3 is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
No luck installing the Beta from Steam; it is requesting an access code.
Also, no luck in uploading an attachment. However, I was able to put it on my Dropbox at The line of sight code that I'm trying to use is on line 93 of the "Level Play Event Sheet"
B
5
Posts: 11
Reputation: 272


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests