How do I add Line of Sight

Get help using Construct 2

Post » Tue Aug 19, 2014 2:45 pm

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
B
21
S
9
G
3
Posts: 70
Reputation: 2,722

Post » Tue Aug 19, 2014 3:51 pm

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 ^^
B
21
S
9
G
3
Posts: 70
Reputation: 2,722

Post » Tue Aug 19, 2014 3:53 pm

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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Aug 19, 2014 4:06 pm

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 =)
B
21
S
9
G
3
Posts: 70
Reputation: 2,722


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests