I'm struggling with the implementation of a pathing system for agents who exist in a 2d building, where floors are only accessible via elevators which transport agents between floors.
youtu.be/muiP9EZ2Cek Here is a YouTube clip to better illustrate what I mean by this.
During the course of a play, floors and elevators may be built (and shafts expanded up and down), so the paths must be updated. In the image below, an agent on the 1st floor wishes to go 5th floor but there is no direct path. It must find a path using multiple elevators.
Image: imgur.com/a/N9ef7Tc
My approach thus far is to equip each agent with a stack which determines their actions via an Finite State Machine (states: idle, move, and performAction), the elevator cars also have a stack which receives movements based on agent needs, but it the whole thing lacks central planning.
My question is how would others approach this problem? Some more savvy friends have suggested that it is a graph problem, but I'm not sure on how to technically implement something like that into Construct 2. As in how to implement a shortest path algorithm into an array containing the connected floors. Any insights would be helpful and greatly appreciated
Edit: Realising now there is a C2 'How do I?.."