How do I Reverse Line Of Sight Behavior When Sprite is Mirro

Get help using Construct 2

Post » Mon Apr 07, 2014 9:45 am

I've recently started using Construct 2. I'm using r139. But I've encountered a problem. My enemy has a Line of Sight behavior with field of view set to 180 degrees. The enemy can see a player when the player is in front of them. But when the enemy is mirrored (heading in the opposite direction) the enemy can't see a player in front of the, but they can see a player behind them. How do I make my enemy "see" a player in front of them when the enemy is mirrored? (I tried setting field of view to -180 but that didn't work.
B
5
S
1
Posts: 24
Reputation: 443

Post » Mon Apr 07, 2014 1:32 pm

@nchima - hmm, I don't have any experience with line of sight behavior, but the first thing I would do is update your C2 to newest version.
B
33
S
7
G
8
Posts: 312
Reputation: 8,528

Post » Mon Apr 07, 2014 2:14 pm

The field of view in LOS is based on the objects current angle , so you will have to change this and not just mirror the object for it to work correctly . The manual is specific on this subject.
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499

Post » Tue Apr 08, 2014 5:33 am

@Manley23 So I updated to r164 and still nothing. @granpa So do you propose I do that? I've got a platformer game. Setting my enemy sprite is to mirrored is the only way that I've found to make the enemy seem like they are "facing" in the opposite direction. If I set angle to 90 the enemy will be lying down facing down. If angle is set to 180 the enemy will be upside down. If set to 270 the enemy will down facing up. And at 360 we'll be back where we started.
B
5
S
1
Posts: 24
Reputation: 443


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], tdcostas and 12 guests