Hey there, I have been racking my brain going crazy trying to find a suitable method for a spawn system in my game. So far, here is the system I have thought of.
1. At the start of the game, the number of spawn points would be counted. This number would then become the "maxNumSpawns" variable, and each point will have their skill99 defined with a "spawnID".
2. In a loop, each spawn point would be scanning in a range of 200ft to count how many "enemies" are near it. The number of enemies near the spawn point would then become "skill98".
3. When a player dies, the game will scan to see which spawn points have the lowest number of enemies near it, then this number becomes the "availableSpawnPoints" variable and the "spawnID" of each point is taken as well.
4. Finally, the game takes the "availableSpawnPoints" variable and picks a random number between 1 and the variable, then creates the player at the proper location using the "spawnID".
I already have my netcode finished, I just need a proper spawning system. Any ideas how I can achieve something like this?
Last edited by exile; 02/15/11 19:18.