Hello, I am making a zombie waves system for my game. I have 15 parts in a line, and those parts are where the zombies can spawn. What I want to make, is when less than 15 zombies spawn, I want them to spawn as close to the middle as possible. Also, I would wanna do this pretty modularly. If anyone could tell me how I could do this, that would be amazing. Thanks for the help I appreciate it!
1 Like
You can create a table of your parts, and sort them based on their distance to the center, from least distance to greatest distance.
Then, simply spawn your zombies at those parts.
1 Like
How could I implement this is a for loop? I got the magnitude from each zombieSpawnPosition, but what now? Actually nevermind.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.