how do I make the user draw the path he wants the "player" to move?

0 favourites
  • 2 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • how do I make the user draw the path he wants the "player" to move?

    I thought about using pathfinding, I would do the entire layout as solid and when drawing a line the user will "destroy or erase" the obstacles and then make the "player" look for a route.

    is it possible to do so?

    please help me!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Mmm... there are several ways to do this. I would recommend using an array to record the drawn path.

    On path drawing active, every set interval push the mouse coordinates to the back of an array.

    On path drawing finished, have the player object move to each coordinate recorded in the array in sequence.

    If you don't want to use an array, you can try using invisible helper sprites instead. As you draw the path, you can create these "cookie crumb" helper objects at a set interval at the mouse location for the player object to follow.

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