I’m working on a turn-based battle system, building upon what tricxta made. I had to write the character selection thing 4 times now and I still can’t get it right.
This version produces a growing area and checks if something’s in it every time it gets bigger, getting the closest npc if multiple are found. The preceding version checked whether if something was in the direction that was pressed and if nothing was, it would check for the closest npc in the direction that was pressed.
I still run in the same problem, sometimes the npcs will be placed in a way that makes them impossible to select. For example, if I place 5 NPCs in a x, the middle one is impossible to select.
Still looking for solutions but I’m running out of ideas. Any?