I have to ask. It's probably some kind of bug on my end but I can't find it and it's driving me a bit nuts
I have a group of object instances (Character) I loop through every game tick. Like this:
Every loop calls a few functions to handle the current Character's movement, collisions, and rendering:
I'm passing object UID's to these functions, which is probably bad practice. But they're global objects created on startup and their UID's never change. So it should be okay.
The problem happens in Collider_Chr(). This function aligns a couple of collision boxes on each side of the Character object and checks if they're overlapping with anything. If one of them does, an instance boolean gets set to true. If there's no overlap, the boolean is false.
This function is structured the same way basically as everything else in the game: I pass an UID to the function, then pick the Character instance from that passed parameter. And it works fine. Except in this case. This event/function doesn't want to pick the right Character instance for some reason, so all the collider objects get set to the position of the first Character in the main loop.
I can't figure it out. This 'pick instance by passed function parameter' approach works fine everywhere else, at least as far as I can tell. Anyone able to see what I'm doing wrong here?