Solved Spawning mobs in specific coordinates and world

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
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:
[the] (location|position) [at] [(][x[ ][=[ ]]]%number%, [y[ ][=[ ]]]%number%, [and] [z[ ][=[ ]]]%number%[)] [[(in|of) [[the] world]] %world%]
(spawn|summon) %number% of %entitytypes% [%directions% %locations%]
 
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:
[the] (location|position) [at] [(][x[ ][=[ ]]]%number%, [y[ ][=[ ]]]%number%, [and] [z[ ][=[ ]]]%number%[)] [[(in|of) [[the] world]] %world%]
(spawn|summon) %number% of %entitytypes% [%directions% %locations%]
Can you make an code for it cuz im not a good coder at skript
[doublepost=1621873196,1621870869][/doublepost]
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:
[the] (location|position) [at] [(][x[ ][=[ ]]]%number%, [y[ ][=[ ]]]%number%, [and] [z[ ][=[ ]]]%number%[)] [[(in|of) [[the] world]] %world%]
(spawn|summon) %number% of %entitytypes% [%directions% %locations%]
Hello?
 
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:
command /spawnmob <mob: entitytype> [<x: number> [<y: number>] <z: number> [<world: world>]]:
    executable by: player
    trigger:
        if arg-2 is not set:
            set {_x} to event-player's x-coordinate
            set {_z} to event-player's z-coordinate
        else:
            set {_x} to arg-2
            set {_z} to arg-4
        if arg-3 is not set:
            set {_loc} to the location at {_x}, 1, {_z}
            set {_loc} to highest block at {_loc}
        else if arg-3 is set:
            set {_loc} to the location at {_x}, arg-3, {_z}
        if arg-5 is set:
            set {_loc}'s world to arg-5
            spawn arg-1 at {_loc}
        else:
            set {_loc}'s world to event-player's world
            spawn arg-1 at {_loc}
 
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:
command /spawnmob <mob: entitytype> [<x: number> [<y: number>] <z: number> [<world: world>]]:
    executable by: player
    trigger:
        if arg-2 is not set:
            set {_x} to event-player's x-coordinate
            set {_z} to event-player's z-coordinate
        else:
            set {_x} to arg-2
            set {_z} to arg-4
        if arg-3 is not set:
            set {_loc} to the location at {_x}, 1, {_z}
            set {_loc} to highest block at {_loc}
        else if arg-3 is set:
            set {_loc} to the location at {_x}, arg-3, {_z}
        if arg-5 is set:
            set {_loc}'s world to arg-5
            spawn arg-1 at {_loc}
        else:
            set {_loc}'s world to event-player's world
            spawn arg-1 at {_loc}
I actually just want, like a invisible spawner that a mob spawns above every like 3 minutes
 
I actually just want, like a invisible spawner that a mob spawns above every like 3 minutes
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:
every 3 minutes in "world":
    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]
 
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:
every 3 minutes in "world":
    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]
but i dont know how
[doublepost=1622018786,1622018692][/doublepost]
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:
every 3 minutes in "world":
    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]
but still thanks for the help
 
Status
Not open for further replies.