User avatar
By tridaak
#196712 I'm setting up a server with pokespawners, but find how pokemon are being spawned in by them odd.

So, to start off. From what I've seen, pokespawners spawn pokemon in the same y-coordinate they're placed at and often looking at the same direction.
If a pokespawner is too high and set to spawn land pokemon, the pokemon will fall to the ground and sustain damage.
If the pokespawner is near a ledge, pokemon who spawn in the ledge will get suffocated. (At least until they move out of the way)
If the pokespawner is in the sky, spawning air-persistent pokemon, they will all spawn in the same y-coordinate and all flying north.

Was wondering, if possible and not too complex. To add a y-coordinate threshold (Idk what else to call it), where it would scan for safe locations within the radius and y-coordinate threshold for a safe location to spawn the pokemon.
So, if the spawner is near a mountain, server owner would set for a high threshold as not to have the pokemon suffocate or take fall damage.
If if's spawning flying flying pokemon, it'll spawn pokemon at different altitudes.

And possibly add a random direction for the pokemon to be looking at when they spawn.
User avatar
By MrMasochism
#197266 the difficulty here is due to when people want to put spawners in roofs or when they put spawners in areas with multiple levels, to try and make these situations work out the spawners try and follow the terrain around the spawner for spawn locations