Invert Line Of Sight

Get help using Construct 2

Post » Tue Jun 18, 2013 9:57 pm

I'm having trouble picking objects that are not in line of sight by using the new Line Of Sight condition and inverting it. Nothing seems to get picked. Is this a bug or just not possible?

You can try it in the example that comes with r134. Just invert the line of sight condition there, and no piggies get highlighted.
B
31
S
6
G
1
Posts: 19
Reputation: 3,828

Post » Tue Jun 18, 2013 10:01 pm

I've encountered the same thing. I can only assume it's a bug.
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Tue Jun 18, 2013 10:42 pm

same here.
B
48
S
16
G
9
Posts: 1,098
Reputation: 11,197

Post » Wed Jun 19, 2013 4:55 pm

It behaves strange for me as well, but remember to post things like this in the bugs forum or the issue might not be adressed. I'll do it this time.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Wed Jun 19, 2013 5:48 pm

Well its a behavior so it would logically apply to just the objects that had the behavior.

What you could try is a variable comparison like if sight = 0 then do foo, and then add a condition to change that objects variable when it is picked by the behavior object, set sight to 1.
You might also want to add an else after that condition to set that variable back to 0.
Image ImageImage
B
169
S
50
G
174
Posts: 8,322
Reputation: 110,788

Post » Wed Jun 19, 2013 5:55 pm

I managed to solve "invert" issue with else statement. Tho I had problem where first spawned object didnt not understood LOS, had to destroy object and create another instance before LOS started to kick in.

Funny enough, doing "does object has LOS on player" returned false, even when object had line of sight to player and it worked, just boolean returned was wrong.
B
7
S
1
Posts: 51
Reputation: 1,087

Post » Wed Dec 31, 2014 8:23 pm

I try to post this to bug report forum, hopefully C2 team can fix this. If this is not a bug perhaps they can explain how this condition picks object after being inverted.
B
17
S
4
G
1
Posts: 203
Reputation: 1,583


Return to How do I....?

Who is online

Users browsing this forum: beohs, brunopalermo, dop2000, Walessio and 14 guests