Patrol, Attack, Patrol...

Get help using Construct 2

Post » Thu Jun 20, 2013 3:45 pm

Lots of people having problem with this. I got some time so i was trying to solve it, but without much success.
Any of you guys already solved it? is there a .cap?
B
7
S
3
G
1
Posts: 154
Reputation: 1,812

Post » Thu Jun 20, 2013 4:31 pm

did you check the FAQ section , there's MANY examples on how to solve this ...
B
41
S
17
G
17
Posts: 2,247
Reputation: 17,436

Post » Thu Jun 20, 2013 4:51 pm

In fact, I've checked and got amazed how it was not solved.
B
7
S
3
G
1
Posts: 154
Reputation: 1,812

Post » Thu Jun 20, 2013 5:11 pm


Here ya go , found 2 shiny examples in the FAQ

An Example

Another Example

Also , Your description is too vague , you say if it was a top-down , a platformer , what would be the enemy's behavior , when will the enemy attacks ... etc.

Next time , if you want some help , please check the FAQ and search the forums ...

Don't take it badly , cheers !Whiteclaws2013-06-20 17:24:29
B
41
S
17
G
17
Posts: 2,247
Reputation: 17,436

Post » Thu Jun 20, 2013 5:21 pm

@Whiteclaws
I think you may have missed the point, he's looking to have enemies that patrol, chase the player if in view, but return to their original, pre-determined path if you escape or die. None of the examples in the FAQ cover this as far as I can see.

Edit: I'll probably have a go at this when I have time, need an excuse to test out the LOS behaviour anyway.Nimtrix2013-06-20 17:29:44
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jun 20, 2013 5:25 pm

Oh , misurstanding , sorry for that , but your description doesn't help too
B
41
S
17
G
17
Posts: 2,247
Reputation: 17,436

Post » Thu Jun 20, 2013 11:03 pm

Alright, took some time to get it right, but I think it's pretty stable now. Feel free to tag me (@Nimtrix) if you encounter any issues.

Anyway, here it is:
Patrolling.capx (r134)
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Fri Jun 21, 2013 12:50 am

@Nimtrix, you have not just nailed the case, but renovated my belief on the human spirit. Is there something i can do for u?
B
7
S
3
G
1
Posts: 154
Reputation: 1,812

Post » Fri Jun 21, 2013 1:12 am

Don't worry about it, use it for something cool.

PS: I've noticed they sometimes (although very rarely) get stuck at the corners. You can experiment with the pathfinding cell size/border settings or maybe adjust collision polygons if this becomes an issue.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Fri Jun 21, 2013 2:20 am

@Kyatric this deserve to be on that list
B
7
S
3
G
1
Posts: 154
Reputation: 1,812

Next

Return to How do I....?

Who is online

Users browsing this forum: Fib, Google [Bot], imhotep22, irbis, raulcg1981, shukra and 0 guests