#Summon in a relative area around the player (1.21.1)
1 messages · Page 1 of 1 (latest)
When the game stops identifying the function this usually means that you've made a syntax error.
are you splitting the same command over 2 lines?
anyways here is the best a method:
- run a
random rollcommand and store this in a storage usingexecute storedo this for each of the axis.XYandZ - create a macro function that uses these values to summon the entity from an offset to the player corresponding to the values stored in the storage
- run the function with the storage as macro provider
one thing to add so the entity doesn't spawn in the ground, add the positioned over sub comand in the summon command to let it spawn on the surface.
If you want that, it's easier to ommit the Y position, saves you a command
If you want them to spawn on the surface, just use the /spreadplayers command
True, no need to overcomplicate such a simple thing.
Yeah, was trying to do so
you can do that only if you end the line in \ or \ I don't remember which way around.
the first one \ for example: ```ansi
[35mexecute [34mif entity [36m@s[33m[[37mtag[34m=[32mtest[33m] [30m
[34mrun [35msay [0mhi
huh why is it black that's very unreadable
ansi messup
spreadplayers worked for me!
So I'm going for spreadplayers ~ ~ 1 15 false @e[tag=scattered_zombie] and then kill th tag so any previously generated zombie can be repositioned
Thanks for the help here
Small extra thing. If you kill mobs to reposition them, they drop stuff. If that's an issue, you can just teleport them to y -10000