Invert LOS

Bugs will be moved here once resolved.

Post » Wed Dec 31, 2014 9:16 pm

Problem Description
Inverted LOS condition makes strange picking.

Attach a Capx
invert los.capx


Description of Capx
There are 2 Players and Enemies. Press arrow key to move Players. When Player has LOS of Enemy,both Player and Enemy should change their opacity to 100,else 30.

Steps to Reproduce Bug
  • Place more than 1 instances of 2 different objects(unequal or equal)
  • Use the LOS condition and invert it
  • etc.

Observed Result
The Players and Enemies change opacity alternatingly (not following their coresponding target) when Player has LOS of Enemy.

Expected Result
Player and Enemy should change their opacity according to their target.

Affected Browsers
  • Chrome: YES
  • FireFox: YES
  • Internet Explorer: YES

Operating System and Service Pack
Window 7

Construct 2 Version ID
r192
You do not have the required permissions to view the files attached to this post.
B
17
S
4
G
1
Posts: 203
Reputation: 1,583

Post » Mon Jan 05, 2015 6:37 pm

As far as I can tell it is working correctly, but the negated form of the condition is probably more complicated than you expect. It works a bit like this:

For each Player:
For each Enemy:
If no LOS from Player to Enemy, pick both the Player and Enemy

Since the range of the LOS is 150, you end up with complicated combinations of whether neither, one or both of the Player objects have LOS to the Enemy object depending on their relative distances. This is then displayed as changing opacity as they move around, but as far as I can see it is correctly reflecting these combinations.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,238


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests