Solved Spawn zombies around player with minimum distance

Discussion in 'Plugin Development' started by dajako, Nov 22, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    dajako

    Hey guys, I'm having some issues spawning zombies around a player. Of course I can spawn multiple zombies at a players location and I can randomly spawn them around the player but the issue with that is the zombies can immediately attack the player. I want to spawn zombies a minimum of 5 blocks away and a max of 15 blocks away from the player.

    Anyone have any ideas? Thanks in advance!
     
  2. Online

    timtower Moderator Moderator

    @dajako Have a range for 30 in a random generator. Subtract 15, if that is between -5 and 5, try again.
    Do that for x and z
     
    dajako likes this.
  3. Offline

    dajako

    IT'S SO SIMPLE! WHY DIDN'T I THINK OF THAT?! :O Thank you haha
     
Thread Status:
Not open for further replies.

Share This Page