Pathfinding challenge

  • I'm having these challenges implementing pathfinding in my game.

    The first challenge is on choosing the point i want my player to move to, it rotates sides ways where as i just want it to move in that direction with the front, or turn its fron to that direction and move towards it, however i cant get that done.

    Also, i want to start the run animation only when it is about to move and keep it standing alone when not moving

    Link below

    pathfinding test

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • what I want is path that are one direction rather than just path cost

  • Make a 3 piece rig... one for the legs, and one for the arms and head and one for the collision sprite.

    spawn collision sprite.

    spawn legs sprite +pin to collision sprite

    spawn arms and head sprite +pin to collision sprite.

    Use the collision sprite for your AI's movement routine. (give it the pathfinding behaviour if you re using pathfinding)

    use the arms and head sprite as a turret. (give it a turret behaviour if you want to make it easy.

    The legs are there just for the visuals.

    not going to be perfect, but this will get you going. I would make my own turret routine, but the pathfinding AI seems to work really nice, so I would keep that.

  • jojoe thanks a lot, already found a way around but wld try your approach too

  • And you probably figured it out by now, but the front of a sprite is facing right. (Angle 0)

    (I fixed the "side walk" in your example by opening the Animation editor editor and while holding shift, to affect all frames, clicked rotate Clockwise.)

  • paradox :) thanks anyway

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