Prevent actors from spawning too close to each other?
Like the title says. I can't exactly go in to detail because it would reveal too much of my game. Basically I want the following code:
if magnitude(actor_Instance1X-actor_Instance2X,actor_Instance1Y-actor_Instance2Y) < 60
then destroy 1 instance of the actor
I have no idea if this is even possible because it would require that each spawned actor have knowledge of the location of the other spawned actors, Ugh so confusing lol.
Any suggestions would be great
if magnitude(actor_Instance1X-actor_Instance2X,actor_Instance1Y-actor_Instance2Y) < 60
then destroy 1 instance of the actor
I have no idea if this is even possible because it would require that each spawned actor have knowledge of the location of the other spawned actors, Ugh so confusing lol.
Any suggestions would be great
Answers
^That is probably a really confusing paragraph lol, but that is really the only way I can describe it without giving away too much detail.
EDIT: I think I figured this out, just have it so if the actor is too close to the spawner then prevent spawn. Its funny how things can be fixed simply by writing the problem out lol.