How do I create a patrolling guard?

Get help using Construct 2

Post » Wed Apr 23, 2014 4:24 pm

Hi,

I want to create AI for patrolling enemies.
I need the enemies to move left and right. If they spot the player within 500, I want them to stop moving left and right, start moving towards the player and start shooting. If the player moves away (>550). I need them to go back to the same place and continue the patrol.

So far, I've tried two ways but both are buggy and don't work.

1. I put Pathfind and Line of Sight and 8-Direction behaviour. Used a variable for the two different behaviours of AI(patrolling, attacking)


2. Used the bullet behaviour.

I've attached a screenshot for both ways.

I'll have a lot of guards in my game so I would like, if its possible to do it without changing every time the coords for every guard.

Thanks
You do not have the required permissions to view the files attached to this post.
@coyowl

coyowl.com

Game studio with a portfolio of 3 Apple Featured games.
B
31
S
7
G
2
Posts: 111
Reputation: 2,417

Post » Thu Apr 24, 2014 10:47 am

bump
@coyowl

coyowl.com

Game studio with a portfolio of 3 Apple Featured games.
B
31
S
7
G
2
Posts: 111
Reputation: 2,417

Post » Thu Apr 24, 2014 11:00 am

I'm searching this too :D
~Everyone can make GAMEs~
B
55
S
11
G
1
Posts: 414
Reputation: 5,786

Post » Fri Apr 25, 2014 4:32 pm

I have been wanting to know this as well...
B
13
S
5
G
1
Posts: 119
Reputation: 2,292


Return to How do I....?

Who is online

Users browsing this forum: David181, evillair and 59 guests