How do I get characters to follow each other?

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
  • I'm trying to get characters follow a lead character round a map.

    Aside from pathfinding seeming incredibly slow (delay at start and when clicking), I'm can't work out how to get sprites to follow each other depending on which one is active.

    When a sprite is clicked (detected with mouse over) it's set as active. On left click I tell the sprite to pathfind to where the mouse was clicked (by storing the Mouse.X and Mouse.Y).

    What I want is for the inactive sprites to follow the active one.

    But can't seem to get it working and am at a loss now.

    Any help would be great

  • Check out the custom movement behavior in the manual , it might be what you are looking for ?

  • Thanks granpa I'll check it out!

  • Having tried a few ways I just can't get my head round this.

    Even with a single sprite, when I use pathfinding to get it to move to where the mouse was clicked there's a huge delay before the sprite moves. With other sprites set to follow they often don't move at all or end up in completely the wrong place.

  • what type of game are you making, depending on the type their are a few different ways.

    If you are doing a top view style you could use the bullet function and just assign the object' angle of direction to the play's x and y

    or you could use a pathfinding event. This is a bit harder but it works much better and the ai will be able to move around objects. again you will need to set up the path to the players x and y

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Game wise I guess along an arcade rpg type thing.

    Essentially I have a team of characters that follow a "leader" around (who's moved into position by going to where the mouse left clicks).

    I don't want the characters to rotate when they move, just to kind of follow along but keeping their distance.

    I hope that makes sense.

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