Hi, I'm wondering if there's a fairly compact way to create a random spawnpoint with command blocks. I should specify that I'm not using the /spawnpoint command but rather trying to have players teleport to random locations.
I've built a large PvP arena suitable for both teams and FFA. If the arena is set in FFA mode, I have players put in a pool in a 'ready' room. Once completed, I'll flip a lever and I want those in the room to be teleported to random locations in the arena.
My current setup.
It's not a super massive arena (suitable for maybe 8 players in close - medium ranged combat). Therefore, I'd want 8 different 'spawnpoints'. I have a spawnpad similar to how most PvP maps are started to set a single actual spawnpoint for players. When players in the 'ready' room are all present, they are all sent directly to the "spawnpad" which is just a bunch of string and tripwires that while activated will cycle a short clock that runs off a line of 8 command blocks. Each command block is set with "/tp @r[x,y,z,r] x2 y2 z2" x2 y2 and z2 are different in each command block and represent where that player spawns. So, while YES, this is random at first, it is not random as they continue to play. As players die, in FFA mode, they continually respawn in the web that is the "spawnpad" to be sent back into the arena (after being armed). However, whoever dies first is always going to be random chosen as the first player to spawn at that first position instead of one of the other 7 points.
Is there a way to make it so that the first dead isn't always going to spawn in the first spawn point? Makes it terrible for spawn camping, or is this really the best way of going at it?
Also, I should note that using MCedit is viable and are able to use it. I already am for a lot of things here.
You can always use a minecart running continuously in a loop with the commands that you specified in your post. With the minecart constantly moving, it will create a more random feel since the spawn point won't always start on the first command block in the line.
I do like the idea, but I can't have a clock continuously running. I should note that the arena isn't the only thing on the map. It is on a server that is mostly survival. This is a fun side-game for players to come play.
So I'd have to make this contraption able to toggled on and off, like how mine is set up. It just isn't random after it's first use. If there were a way to turn this on and off with minecarts in a loop on tracks, that would be amazing, but I don't think you can start up a minecart without it sitting against a solid block or pushing it manually? I could use the solid block but then the cart will rock back and forth in a line and I'll get the same outcome I have now, but at a slightly slower pace.
Worked on the original design and made the minecart stop after each command block and holding it there until a person or persons step on the pressure plates. It can handle multiple people with the pressure plates attached to a clock that will keep running as long as someone is on the pressure plates.
The minecart loop track
The redstone underneath the minecart loop track
Picture on the clock (bottom right), pulser(bottom center), spawnpad (top right), minecart loop (top left)
Picture of the spawnpad and clock underneath it. The clock is two repeaters set to max.
Picture of the pulse which provides a long enough signal to move the minecart to the next stopping point
If you don't want to wait for 1.6 you can make a comparator clock ( comparator on subtract mode output running to side of same comparator with lever instead of storage item) hooked up to a command block testing for players in your waiting area { /testfor @p[0,63,0,r=10] } then comparator on the side of that leading to another clock which gets turned on when people are in the area ( via testfor command block change lever to redstone when redstone is on it starts clock) then that clock into dispenser randomizers for each cordnet so say you have 5 diffrent spots you can put 5 randomizers to tp players to the five spots
Also if your arena and waiting area are close together do some math and use /tp @r[0,63,0r=10] ~25 63 ~20 the ~ means CURRENTCORD + Following Number so in this case lets say player is at 2 63 5 run the tp command they would be at 27 63 25 but when 1.6 i recommend using /spreadplayers this is just a workaround til then especially since modded/bukkit servers take awhile to update
I've built a large PvP arena suitable for both teams and FFA. If the arena is set in FFA mode, I have players put in a pool in a 'ready' room. Once completed, I'll flip a lever and I want those in the room to be teleported to random locations in the arena.
My current setup.
It's not a super massive arena (suitable for maybe 8 players in close - medium ranged combat). Therefore, I'd want 8 different 'spawnpoints'. I have a spawnpad similar to how most PvP maps are started to set a single actual spawnpoint for players. When players in the 'ready' room are all present, they are all sent directly to the "spawnpad" which is just a bunch of string and tripwires that while activated will cycle a short clock that runs off a line of 8 command blocks. Each command block is set with "/tp @r[x,y,z,r] x2 y2 z2" x2 y2 and z2 are different in each command block and represent where that player spawns. So, while YES, this is random at first, it is not random as they continue to play. As players die, in FFA mode, they continually respawn in the web that is the "spawnpad" to be sent back into the arena (after being armed). However, whoever dies first is always going to be random chosen as the first player to spawn at that first position instead of one of the other 7 points.
Is there a way to make it so that the first dead isn't always going to spawn in the first spawn point? Makes it terrible for spawn camping, or is this really the best way of going at it?
Also, I should note that using MCedit is viable and are able to use it. I already am for a lot of things here.
Thanks for any helpful information.
~graf
So I'd have to make this contraption able to toggled on and off, like how mine is set up. It just isn't random after it's first use. If there were a way to turn this on and off with minecarts in a loop on tracks, that would be amazing, but I don't think you can start up a minecart without it sitting against a solid block or pushing it manually? I could use the solid block but then the cart will rock back and forth in a line and I'll get the same outcome I have now, but at a slightly slower pace.
Anyways to change this in that way?
The minecart loop track
The redstone underneath the minecart loop track
Picture on the clock (bottom right), pulser(bottom center), spawnpad (top right), minecart loop (top left)
Picture of the spawnpad and clock underneath it. The clock is two repeaters set to max.
Picture of the pulse which provides a long enough signal to move the minecart to the next stopping point
Also if your arena and waiting area are close together do some math and use /tp @r[0,63,0r=10] ~25 63 ~20 the ~ means CURRENTCORD + Following Number so in this case lets say player is at 2 63 5 run the tp command they would be at 27 63 25 but when 1.6 i recommend using /spreadplayers this is just a workaround til then especially since modded/bukkit servers take awhile to update