How do I Generating a path which sprites will follow.

0 favourites
  • 4 posts
From the Asset Store
Move around the rectangular and travel as much as you can!
  • 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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

  • There is already an example:

    or this one:

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)