How do I make characters follow

0 favourites
  • 6 posts
From the Asset Store
120 Epic Fire FX Animations + 2 Bonus Characters. Contains 3000+ frames and a lot of Pixel Art Sprites
  • Sorry for poor english.

    how could i make this?

    like snake.

    but each snakebody is a character.

    follow previous character's step.

    more characters and the team longer,characters would duplicate.

    thanks very much.

  • You could use the "Path Finding behaviour.

    When character 2 is greater than 50 pixels away from character 1.

    Find path, move character 2 to character 1 position.

    When distance from character 2 to character 1 is less than 50 pixels away.

    Stop moving along the path.

    Sorry i can't be specific.

    I haven't used the path finding behaviour for a fair while, and have forgotten the exact code to use.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • sorry about this

    i tried but it didnt work

    i think the problem is the event


  • Thanks

    I found the Plugin end solved it

  • Pathfinding to have a character follow at a former location is a bit overkill and can take up quite a lot of CPU resources.

    You referred to snake. Originally, snake is a grid movement.

    It keeps all the locations of your characters (members) in an array.

    Each "tick" you update the position of the main character/head and position the next element of the body to the former position of the previous element.

    You pass this way through all the elements of body, position them accordingly and save each of their current position in the array.

    The next tick, you do the same.

    Depending on what movement system you are doing you can adapt it and do the same in Construct.

    Or otherwise, you can also Pin Behavior (set to "position" using a rope style) and pin the characters to one another, making a "chain" that is being pulled by the main/first character.

  • Thanks you very much.

    I can let the snake to grid movement,but the collision is confused.

    Still try .

    The picture is ideal

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