try changing the random variables to
floor(random(0,3)
the other option would be to just spawn anywhere on the map
Add a box sprite over earth to create your non-spawning zone
on object created, if overlapping no-spawn zone sprite, then teleport the sprite elsewhere