How do I show the pathfinding path as a line.

Get help using Construct 2

Post » Fri Jun 20, 2014 11:59 am

Hi all, quick question, would be great if you could help me out.

I want the paths that my sprites take when pathfinding to show up as a simple 1pt line.
In the Pathfinding example capx, nodes show up as a blue triangle, I want line a line to appear between each node, so that the sprite then follows the line of the path. :?:

I am sure that the solution is not so complex, but I can`t seem to get anything to work correctly. :oops:

Thank you so much for your time helping me out! :D
B
33
S
8
G
1
Posts: 39
Reputation: 2,297

Post » Fri Jun 20, 2014 12:15 pm

-Also I would like the line to disappear as the sprite travels over it. Anyone have any idea how I could do this?
B
33
S
8
G
1
Posts: 39
Reputation: 2,297

Post » Fri Jun 20, 2014 2:06 pm

See the attached capx.

It's based on the Pathfinding example provided with C2.

I added a couple of actions in event 12 to draw the lines, and event 15 is the one dealing with the "drawing of the line as the sprite moves".
You do not have the required permissions to view the files attached to this post.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,319
Reputation: 87,487

Post » Fri Jun 20, 2014 3:24 pm

That`s perfect, a great example. It`s very very useful to me.
Thank you so much!
B
33
S
8
G
1
Posts: 39
Reputation: 2,297

Post » Sat Jun 21, 2014 10:25 am

I like the sound of this, thanks very much :)
B
6
S
1
Posts: 41
Reputation: 482


Return to How do I....?

Who is online

Users browsing this forum: SputnikCZ and 3 guests