Pathfinding

Get help using Construct 2

Post » Fri May 31, 2013 2:10 am

I am having a little trouble understanding the Pathfinding feature.

How do I actually create the path?

I have added the behaviors and events to follow a path when found... but there are no paths?

I searched on the tutorial and forum section.

Thanks for any help.
Stephen
B
56
S
15
G
13
Posts: 826
Reputation: 17,675

Post » Fri May 31, 2013 4:42 am

Have you seen Project Example Pathfinding?psycholize2013-05-31 04:42:36
B
13
S
3
G
1
Posts: 60
Reputation: 1,828

Post » Fri May 31, 2013 4:45 am

Anyway...

On Start of Layout | Sprite Find Path to (YourX,YourY);
Sprite On Pathfinding Path Found | Sprite Move Along path;
B
13
S
3
G
1
Posts: 60
Reputation: 1,828

Post » Fri May 31, 2013 5:12 am

As mentioned, check the pathfinding example as well as read the manual article.

I have also a tutorial incoming in which I talk about pathfinding, but this won't be published on gamedev tutsplus before late June.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
294
S
117
G
96
Posts: 7,313
Reputation: 71,094

Post » Fri May 31, 2013 5:19 am

@Kyatric @psycholize
Okay, I think I am explaining this poorly.

I want to draw a path right in my layout, several paths actually, then have the enemy randomly pick one of those paths and follow it until the end. Is this possible?
B
56
S
15
G
13
Posts: 826
Reputation: 17,675

Post » Fri May 31, 2013 5:22 am

[QUOTE=Tekniko] ...
I want to draw a path right in my layout, several paths actually...[/QUOTE]
I'd like to know if this is possible also
B
42
S
12
G
6
Posts: 136
Reputation: 6,397

Post » Fri May 31, 2013 6:24 am

The pathfind behavior will only calculate one path (the quickest), not several.
To display that path, the example has a "debug" group I believe that allows to display it, check it out.

New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
294
S
117
G
96
Posts: 7,313
Reputation: 71,094

Post » Fri May 31, 2013 6:56 am

One alternative would be to make your own waypoint system. Here is an quick example:

Waypoint example

The general idea is that each WP is linked to next WP's UID (can be done in the editor), then the navigators just follow path formed by those WP's.
B
24
S
9
G
7
Posts: 756
Reputation: 7,312

Post » Fri May 31, 2013 7:45 am

Thank you, @vee41 and everyone else.

I have been thinking about this all night and I have come to the conclusion I will need to make my own sort-of way-point system. I will take a look at the above example and another example I found on here.

Thanks all,
Stephen
B
56
S
15
G
13
Posts: 826
Reputation: 17,675


Return to How do I....?

Who is online

Users browsing this forum: ultrafop, Yahoo [Bot] and 11 guests