0 Favourites

Invert LOS

  • Problem Description

    Inverted LOS condition makes strange picking.

    Attach a Capx

    [attachment=0:3lv04in1][/attachment:3lv04in1]

    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

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)