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.

Solved Spawning mobs in specific coordinates and world

Discussion in 'Skript' started by Maciejekcho1, May 24, 2021.

Tags:
Thread Status:
Not open for further replies.
  1. Maciejekcho1

    Maciejekcho1 New Member

    Joined:
    May 24, 2021
    Messages:
    9
    Likes Received:
    0
    How to do this?

     
  2. Best Answer:
    Post #6 by Tymen van Essen, May 25, 2021
  3. Tymen van Essen

    Joined:
    May 20, 2021
    Messages:
    43
    Likes Received:
    1
    spawn <mobtype> at <location>
    location includes X, Y, Z and world.
    you can also use "<number> of <mobtype>" to spawn multiple.

    for example:

    spawn ghast 6 blocks east from event-player's location
    spawn 5 zombies the location at x =10 , y = 100 z = -10 in world %world%


    Code (Text):
    1. [the] (location|position) [at] [(][x[ ][=[ ]]]%number%, [y[ ][=[ ]]]%number%, [and] [z[ ][=[ ]]]%number%[)] [[(in|of) [[the] world]] %world%]
    2. (spawn|summon) %number% of %entitytypes% [%directions% %locations%]
     
  4. Maciejekcho1

    Maciejekcho1 New Member

    Joined:
    May 24, 2021
    Messages:
    9
    Likes Received:
    0
    Can you make an code for it cuz im not a good coder at skript
    --- Double Post Merged, May 24, 2021, Original Post Date: May 24, 2021 ---
    Hello?
     
  5. Tymen van Essen

    Joined:
    May 20, 2021
    Messages:
    43
    Likes Received:
    1
    wait you want to have a command ingame to spawn a zombie at a location?
    something like this could be used... i guess.
    also don't assume people don't have other stuff to do than help you.

    Code (Text):
    1. command /spawnmob <mob: entitytype> [<x: number> [<y: number>] <z: number> [<world: world>]]:
    2.     executable by: player
    3.     trigger:
    4.         if arg-2 is not set:
    5.             set {_x} to event-player's x-coordinate
    6.             set {_z} to event-player's z-coordinate
    7.         else:
    8.             set {_x} to arg-2
    9.             set {_z} to arg-4
    10.         if arg-3 is not set:
    11.             set {_loc} to the location at {_x}, 1, {_z}
    12.             set {_loc} to highest block at {_loc}
    13.         else if arg-3 is set:
    14.             set {_loc} to the location at {_x}, arg-3, {_z}
    15.         if arg-5 is set:
    16.             set {_loc}'s world to arg-5
    17.             spawn arg-1 at {_loc}
    18.         else:
    19.             set {_loc}'s world to event-player's world
    20.             spawn arg-1 at {_loc}
     
  6. Maciejekcho1

    Maciejekcho1 New Member

    Joined:
    May 24, 2021
    Messages:
    9
    Likes Received:
    0
    I actually just want, like a invisible spawner that a mob spawns above every like 3 minutes
     
  7. Tymen van Essen

    Joined:
    May 20, 2021
    Messages:
    43
    Likes Received:
    1
    well that is not at all what you described in your title. if you had explained it in your post you might have had some help with it.

    you can use an event that reoccurs with "every %timespan% in [world] %worlds%"
    so

    Code (Text):
    1. every 3 minutes in "world":
    2.     spawn zombie at location at (0, 80, 0) event-world
    i would advise you to check if a player is closeby as well though.[/S]
     
  8. Maciejekcho1

    Maciejekcho1 New Member

    Joined:
    May 24, 2021
    Messages:
    9
    Likes Received:
    0
    but i dont know how
    --- Double Post Merged, May 26, 2021, Original Post Date: May 26, 2021 ---
    but still thanks for the help
     
Thread Status:
Not open for further replies.

Share This Page

Loading...