Line of Sight problems with object instances

Get help using Construct 2

Post » Sat Sep 16, 2017 5:31 pm

Message: Tool90 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
I can't get Line of Sight to work properly. I have a Drone enemy that should face the player when it enters its Line of Sight, start shooting it and chase it if he moves away. Everything works fine but the Drone sees the player thru the tilemap as well (which I set as custom obstacle).

I've got:
- LoS behavior on the drone set to "custom obstacles"
- Called the tilemap as obstacle at start of layout

After searching thru the web I've tried the following things:

-Added some solid environment sprites as obstacles (instead of a tilemap) but nothing changed

-Tried coding the Line of Sight tracking events using the Drone enemy's family instead of the object (as I reckon should be the proper way of doing this), and it seemed to work, but then as soon as an object instance would detect the player all the other ones would do it as well, even beyond obstacles.

EDIT:
On a side note - the pathfinding is working fine, the drones chase the player only after he gets in a position where they could see him.


Took a screenshot of the event sheet, it's probably very messy - maybe you guys can point me in the right direction:
https://imgur.com/a/tbMUd
B
3
Posts: 1
Reputation: 177

Return to How do I....?

Who is online

Users browsing this forum: Blendi1223, jatin1726, kiki4construct, Kyatric and 25 guests