patrolling enemies

For questions about using Classic.

Post » Thu Jan 31, 2013 9:50 am

Hello everyone! I am new in constract. Please, explain me, how do i make enemies patrol like in that picture.

Alucard2013-01-31 13:18:09
B
3
Posts: 2
Reputation: 279

Post » Thu Jan 31, 2013 1:20 pm

There are a lot of ways to achieve this. Try the rts object, its has pathfinding, or if you don't need that just store the waypoints and move your object towards them.Pecek2013-01-31 13:20:58
B
10
S
6
G
3
Posts: 127
Reputation: 2,481

Post » Fri Feb 01, 2013 12:23 pm

Thank you, i solved the problem with rts and line of sight behavior.Alucard2013-02-01 12:24:05
B
3
Posts: 2
Reputation: 279

Post » Sun Apr 07, 2013 4:43 am

Alucard - can you share how you solved it? I'm trouble with that too...
B
7
S
1
G
3
Posts: 7
Reputation: 3,035

Post » Mon Apr 08, 2013 2:43 pm

@Alucard, @ADenton, the Pathfinding object can be very intensive if used too often or by too many objects at once.

Here's a method of pathfinding by sprites: http://dl.dropbox.com/u/4714446/Pathfinding.cap

And a method of determining line of sight to a player I created to avoid crashes caused by the Line Of Sight behavior in I Had Hope: http://dl.dropbox.com/u/4714446/CustomLOS.capJayjay2013-04-08 14:47:18
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Sat Apr 13, 2013 4:33 am

@Jayjay - many thanks =) I was looking at this form of behaviour as a way to solve an issue of developing patrolling behaviour internal to a room. What I've been ultimately trying to solve is how to develop patrolling behaviour between rooms with walls as obstacles. For instance - if we had a guard patrolling rooms in a house viewed from a top down POV, how would you solve the issue of pathfinding a route around obstacles like walls? Without figuring that, I thought I could locate guards inside one room, set waypoints as per your examples and have them rotate through that space.

Any ideas about pathfinding around obstacles to reach and move through a series of waypoints?

Any thoughts would be much appreciated...
Cheers
B
7
S
1
G
3
Posts: 7
Reputation: 3,035


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest