NPC Helper Programming

Im making a side-view game and there are npcs that you get that will help complete tasks and fend off enemies and such, I plan on making them move like how the player does
How would I achieve this?


here is a screenshot of my events

is anyone able to help me?

How do you mean “Move like how the player does”? Is this movement independent of the player, or should they follow the player and move as the player does but with a slight delay - for example like the cats in this clip of Strikeforce kitty?

the movement is independent of the player but the player is using the platformer behavior so thats how the npcs move and they have to do tasks (track down the nearest object and once its completed, they go to the next one) and when there are enemies then they have to take out enemies too (shoot the nearest enemy)

What type of NPCs? A flying NPC would be fairly easy. It could use the pathfinder behavior with the platforms as obstacles

A platform NPC could be sort of easy if it was confined to the platform the player was on.

If the NPC had to use ladders or jump gaps then that would be tougher. The pathfinder behavior could help to choose a direction to use with a platform behavior or to add forces. Or maybe just compare the X of the NPC to the target or destination.

If the process of doing a task is just a set of movements and pauses, then you could create a series of way-points for the NPC to travel to. Each waypoint could also have an action (like pausing) or animation to play before the NPC moves to the next way-point.