How do I add Line of Sight

0 favourites
  • 4 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • Hello community,

    I come to you because i have a little problem with the LOS Behviors, i will explain how i think it's work, after what i've done and then what's my problem =)

    For the Behaviors LOS you have 4 parameters : Obstacles, range, cone of view, Collisions Cells ... So if i set Range to 300 pixel and Cone of view to 360° i think it create a circle of 300px on the Specify object. ( Correct me if it's no that ^^ )

    Then i would like to make the ObjectA move randomly to another point (X,Y) on the map when he have ObjectB on LOS. ( That's work but not really ... )

    So the problem was the ObjectA don't move when ObjectB enter in his LOS, he move when ObjectB enter the left his LOS ... =s ...

    Is there someone who have an idea to make ObjectA move evry time ObjectB enter on his LOS.

    Thank you ! =D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok add some parameters and then more target the problem ...

    So this is my action system :

    On ObjectA have ObjectB in LOS >> ObjectA move Along path ( I don't will detail the PathFinding action here it's working well ^^, the problem don't come from the path i think XD )

    So the problem is the ObjectA "Load the path ( It's hard to sy it but he "move" along the path without moving XD ... If you prefer i have add n action that's load and animation when ObjectA is moving along Path and when the ObjectB enter in his LOS the animation Start so i think the ObjectA is moving along the path but don't really MOVE )

    But when the ObjectB is leaving the LOS "Area" the ObjectA now really move to the point X,Y.

    I hope it's not hard to understand hehe ^^

  • Without seeing how you have your events set up, it will be near impossible to answer your question..

    have you checked if there are any conflicting events?

    cone of 360 and 300px should do exactly what you think, so the issue should be somewhere else..

  • No problem this is the prototype =)

    Ok found the way to do what i want =)

    The solution was to change the range on enter in LOS =)

    Thank you poeple =)

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