How can I build a Blueprint NPC queue system where NPCs line up, move forward one by one, and keep adjustable spacing?

Hi everyone! :waving_hand:
I’m trying to understand how to make an NPC queue system from scratch in Blueprints (Unreal Engine 5.5).
I’m not necessarily looking for someone to fix my current setup — I’d really like to learn how to properly build it step by step.

Here’s what I want the system to do:

  1. NPCs spawn at a set distance in front of the seller (I want to control that distance with a variable).

  2. Each new NPC spawns behind the previous one, keeping an adjustable spacing (DistanceBetweenNPCs).

  3. There’s a maximum number of NPCs at once (MaxNPCCount).

  4. NPCs should walk toward the seller, then stop in line before reaching them.

  5. When the first NPC finishes (for example after an interaction), it should move to the side, walk away, and despawn.

  6. The rest of the NPCs move forward one position, and a new NPC spawns at the end of the line to replace the one that left.

So basically, I want to build a clean queue or line system where NPCs always maintain their spacing, take turns, and recycle smoothly.

If someone could explain how to set up the logic — like how to manage positions, timing, and movement between NPCs — that would really help me understand it.
I’d rather learn the structure and reasoning than just copy a fix.

Thanks a lot for any guidance or step-by-step explanation :folded_hands:

1 Like