How do you handle monsters in an rpg?
Let’s say we are talking about a game like minecraft or wow, there are multiple monsters, sometimes even multiple of the same monster… like skeletal archers e.t.c
How do you know which instance of the monster class the player is attacking? I’m making an rpg, and i don’t know how you can tell which instance of the monster class the player is currently attacking… how would this work? Do these games get the x and y (and z) coordinates of the current object and then somehow determine which instance or object of a monster class the player is attacking?
How do you determine this? Any ideas?