Hello
Today I started working on NPCs for a top-down RPG and came up with a system that changes an NPC's direction and its state (moving/stopped) randomly every second. This worked nicely when there was only one NPC but when adding more, 2 things happened; It became easily apparent that the NPCs only move/change direction once a second, which isn't very aesthetic, and I started having issues aligning the correct NPC sprite with the correct NPC object and playing the correct animation.
After being stuck at this for a while, my MFA was getting way too complicated and even crashing so I figured it's time to go to the forum for help. There's probably a way better solution I'm not seeing (or just a better way to do NPCs entirely).
Attached is my MFA, stripped down to what I had before I started on getting it to work with multiple NPCs.
Please login to see this attachment.