JonathonOgden's Forum Posts

  • 2 posts
  • Just wondering if a solution was ever found to this problem?

    I'm using the same setup with a player that has the 8 Direction behaviour set to 4 directions, 'Default controls' set to 'No' (I'm using a Gamepad) and 'Set angle' property set to 'No'.

    I tried the following and the event 'Has LOS of object' never returns true despite the dummy object changing direction correctly:

    1. Insert dummyObject and assign it the 'Line of Sight' behaviour (using default values)

    2. In the event sheet, 'For every tick':

    2a. 'Set angle' for dummyObject to: player.8Direction.MovingAngle

    2b. 'Set position to another object' for dummyObject to 'player' (leaving Image point option as 0)

    3. In the event sheet, if dummyObject 'Has LOS to object' where object is 'someGameObject':

    3a. 'Set opacity' of 'someGameObject'

    Like I said, the dummyObject moves with the player and rotates based on the 4 directions of movement correctly not that it matters since the default value for 'Cone of view' is 360 degrees so it doesn't matter about the facing direction.

    There are also no solid obstacles between the dummyObject and someGameObject.

    Going to try one or two more things, but in the event someone spots a problem or has a solution would really appreciate your comments.

    Problem solved.

    I had a 'Solid' behaviour on my player which meant that the dummyObject line of sight was always obscured by the player because the 'Line of Sight' behaviour had the 'Obstacles' property set to 'Solids'.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just wondering if a solution was ever found to this problem?

    I'm using the same setup with a player that has the 8 Direction behaviour set to 4 directions, 'Default controls' set to 'No' (I'm using a Gamepad) and 'Set angle' property set to 'No'.

    I tried the following and the event 'Has LOS of object' never returns true despite the dummy object changing direction correctly:

    1. Insert dummyObject and assign it the 'Line of Sight' behaviour (using default values)

    2. In the event sheet, 'For every tick':

    2a. 'Set angle' for dummyObject to: player.8Direction.MovingAngle

    2b. 'Set position to another object' for dummyObject to 'player' (leaving Image point option as 0)

    3. In the event sheet, if dummyObject 'Has LOS to object' where object is 'someGameObject':

    3a. 'Set opacity' of 'someGameObject'

    Like I said, the dummyObject moves with the player and rotates based on the 4 directions of movement correctly not that it matters since the default value for ConeOfSight is 360 degrees so it doesn't matter about the facing direction.

    There are also no solid obstacles between the dummyObject and someGameObject.

    Going to try one or two more things, but in the event someone spots a problem or has a solution would really appreciate your comments.

  • 2 posts