How do I show path of moving object? [Animation included]

Get help using Construct 2

Post » Sun Nov 30, 2014 12:07 pm

Hello guys,

I am working on something using path finding. I want to ask if any one has an idea about drawing this kind path lines:

Image
B
21
S
4
G
4
Posts: 161
Reputation: 3,803

Post » Sun Nov 30, 2014 9:53 pm

How do i forum runs like crazy. To top please.
B
21
S
4
G
4
Posts: 161
Reputation: 3,803

Post » Mon Dec 01, 2014 9:30 am

Run the path finding, store the point locations and then add a sprite to the locations where you want a dot. Then connect the dot sprites with a line as you go?
Some games: https://play.google.com/store/search?q= ... s&hl=en_GB Feel free to show the panda some support, he would appreciate it :)
B
19
S
5
G
1
Posts: 155
Reputation: 1,619

Post » Mon Dec 01, 2014 9:43 am

BinaryPanda wrote:Run the path finding, store the point locations and then add a sprite to the locations where you want a dot. Then connect the dot sprites with a line as you go?


Looks like he wants the points before doing the pathfinding though? The pathfinding demo already draws sprites at the node locations, maybe do some spline curve magic between those points. It will approximate the path that will be taken, but I don't think you can ever know the exact path that will be taken.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Mon Dec 01, 2014 3:32 pm

@BinaryPanda @codah

I couldn't manage to do as you guys told. May be i am missing something. I will give another try to make it happen. Otherwise i will take that part from game and give a sample .capx file.

I will let you guys know .
B
21
S
4
G
4
Posts: 161
Reputation: 3,803

Post » Sat Mar 11, 2017 3:08 pm

Hi Onur,

did you find a solution, yet? I'm struggling with the same thing. I'm really annoyed by the limitations of C2, I've installed like 50 plugins and still miss a lot of capabilities.
B
18
S
2
Posts: 34
Reputation: 1,493

Post » Sat Mar 11, 2017 4:18 pm

zooid wrote:Hi Onur,

did you find a solution, yet? I'm struggling with the same thing. I'm really annoyed by the limitations of C2, I've installed like 50 plugins and still miss a lot of capabilities.


Hey Zooid. This is an old thread.
As for showing the path, I decided to go for it and here's a crude solution I came up with:
https://www.dropbox.com/s/fzb9lc0xjlmrt ... .capx?dl=0

Path is not exact and there's a little wait time involved.
Image Image Image
B
32
S
12
G
27
Posts: 761
Reputation: 17,246

Post » Sat Mar 11, 2017 4:31 pm

https://www.dropbox.com/s/3ho6cv6ipwt53 ... .capx?dl=0

Here's another one. Slightly more precise. Use 1 pathfinding and 1 bullet for a little more accuracy.
Image Image Image
B
32
S
12
G
27
Posts: 761
Reputation: 17,246

Post » Sun Mar 12, 2017 2:42 am

Thank you so much @MPPlantOfficial, that's really helpful.
B
18
S
2
Posts: 34
Reputation: 1,493

Post » Sun Mar 12, 2017 5:15 am

zooid wrote:Thank you so much @MPPlantOfficial, that's really helpful.


https://www.dropbox.com/s/3ho6cv6ipwt53 ... .capx?dl=0

Here's another one using the bullet example. Pathfinding is slighty faster and I fixed the lengths of the path trail.
You could probably make a better path trail using the canvas plugin but here's how I'd do it using normal sprites.
Image Image Image
B
32
S
12
G
27
Posts: 761
Reputation: 17,246

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests