How do I Generating a path which sprites will follow.

Get help using Construct 2

Post » Fri Feb 26, 2016 10:59 am

This looks a simple matter just using the pathfinding behavior but what I want is a bit different.
On the start of layout, or called I want generate a path to a location then I want Objects to follow that path without using pathfinding.

What my initiative though was, to use an invisible sprite with pathfinding that drops "points" (once) which the objects will follow, but I have no clue how I would have them follow the instances in the correct order.
B
3
Posts: 9
Reputation: 193

Post » Fri Feb 26, 2016 10:08 pm

That's a good plan.

You can use an array to store your "waypoints" by using the push back action - this will add new values to the back of the array.

Those waypoints will be in order in the array, so your object can get its move to locations from the array one waypoint at a time in order.

https://www.scirra.com/manual/108/array

Edit: In case you aren't familiar with arrays, you can just think of them as spreadsheets with cells you can write and get data from. Each cell is like a variable.
Mistakes were made.
B
54
S
28
G
115
Posts: 1,705
Reputation: 65,083

Post » Sat Feb 27, 2016 5:15 am

bullet movement on over object or on collision with object set angle

you do not need an array to set waypoints.

you can set instance 1,2,3,4,5,6 and so on. if over 1-6 set find path to next 1-6 if 6 then find path to 1
B
29
S
13
G
10
Posts: 355
Reputation: 8,337

Post » Sat Feb 27, 2016 12:20 pm

ImageImage
B
114
S
51
G
24
Posts: 790
Reputation: 23,480


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests