1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Efficient way to make mobs spawn around player

Discussion in 'Skript' started by Fluffy i Am, Mar 20, 2020.

Thread Status:
Not open for further replies.
  1. Fluffy i Am

    Fluffy i Am Member

    Joined:
    Dec 26, 2018
    Messages:
    4
    Likes Received:
    0
    Hello!

    I'm currently making a skript that involves spawn of zombies, does anyone know how i can make them spawn around the player without making the server working overtime for it to work?

    Thanks :emoji_slight_smile:
     
  2. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    429
    Likes Received:
    30
    this is a skript i made that makes 2-3 zombies spawn in a radius of 5 blocks around the player every 30 seconds
    Code (Text):
    1. every 30 seconds:
    2.     loop all players:
    3.         loop (random integer between 2 and 3) times:
    4.             loop blocks in radius 5 around loop-player:
    5.                 if loop-block is not loop-player's location:
    6.                     spawn zombie at loop-block
     
  3. Fluffy i Am

    Fluffy i Am Member

    Joined:
    Dec 26, 2018
    Messages:
    4
    Likes Received:
    0
    Is there anyway to make sure they don’t spawn inside blocks and suffocate?
     
Thread Status:
Not open for further replies.

Share This Page

Loading...