How do I Make a sidescrolling platformer line of sight

Get help using Construct 2

Post » Tue Mar 01, 2016 2:01 am

Im making a platformer shooter, with an advanced aiming sistem for higher level enemies, how do I make this kind of line of sight so the enemy can detect where the player is and be able to use shoot like that?
B
8
S
1
Posts: 37
Reputation: 424

Post » Tue Mar 01, 2016 3:43 am

You could always use the built in Turret behavior as well as the line of sight behavior

that way whenever you have line of sight you can tell the enemy to fire with the auto aiming function of the turret behavior.

hope that makes sense.
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
35
S
13
G
8
Posts: 318
Reputation: 7,685

Post » Tue Mar 01, 2016 1:11 pm

I dont know, I would like for it to have no rotation but animation change, like giving the enemy 5 lines, when the player overlaps one of those line he will change animation to an animation where he aim towards the end of the line and shoots, since the player is touching that line the bullet will touch there, Its kind of complicated, and the mechanic goes more than there, the idea is that he only sees to straight 2 sides, that means 32 pixel behind him and 160 pixels in front of him, in 2 cones of 10°, the other 3 cones that are the diagonal cones and upwards cone are inactive so it wont trigger an alarm,

any ideas for making this? besides using an event that goes ''Enemy>on collision with sightcone = sightcone > pin to enemy" and ''enemy > is on screen = spawn 5 sightcone'' because I dont own c2 so Im really limited with everything
B
8
S
1
Posts: 37
Reputation: 424


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests