Line of Sight

Get help using Construct 2

Post » Fri Apr 05, 2013 5:58 pm

While experimenting on a simple top down format, I noticed that Construct 2 does not have a Line of Sight Behavior like Classic, is there anyway to substitute range detection so that enemies can chase the player within, say, 300-400 pixels?

Also, is it possible to implement it in such a way that enemies cannot see past solids, or have the ability to maneuver around corners?
B
2
Posts: 8
Reputation: 316

Post » Fri Apr 05, 2013 6:33 pm

Yup, search the tutorials section for good, detailed solutions. :-)
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Sat Apr 06, 2013 12:21 am

I have tried replicating the tutorials but its still not what I want, all of them only apply the line of sight to a single instance of the enemy, and that single enemy determines the stance of all other enemies, meaning that I cant have one guy chase me without the entire pack mauling me

Any other ideas?
B
2
Posts: 8
Reputation: 316

Post » Sat Apr 06, 2013 1:22 am

Pin an invisible sprite the size and shape of your intended field of view to your enemy and use it as the line of site. When something collides with it, that is what gets chased, of it collides with a solid disable the follow behavior until the line of site is no longer overlapping the solid. Just a rough idea off the top of my head, but it may be a beginning to what you are looking to do.
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418


Return to How do I....?

Who is online

Users browsing this forum: Colorfish, Waltuo and 4 guests