npc follow player

0 favourites
  • 2 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • Hello I would like to know how to have character follow the player. Please help thanks!!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To do this, you could look at the path finding behavior. Your character will need to have a path finding behavior and will need to check its distance from player. If the player is outside of your acceptable distance, it should use the path finding behavior to get to the player. This is extremely simple and make use of the built in functions in Construct but the character will not follow the exact path of the player, it would just try to find the shortest available path.

    If you want the character to follow the players moves exactly, you would need to record the exact path the player used. You could do this easily by dropping invisible helper objects at each point where the players direction changes. These objects would need to have an incremental number variable so the character could follow them in order. When the character collides with each helper, it records the number of the object and the object is then destroyed. A good way to learn how to do this is to look at the template in Construct for click to move. Open Construct, create a new project and look through the list of templates for click to move.

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