Hey, Can anyone help me with a problem i got. I want to use the </spectate @r "Spectator-Name"> at an intervall on 1.15 Java server
I have tried using scoreboards comands on repeating Command Blocks. But i only get it to count and not the reset or execute the /spectate command. But im guessing some of the commands i use is out of date. And i spent two days probably following a tutorial on commands blocks and not a single thing have worked.
With redstone reapeters and a simple command Block there is no problems. Im testing in singleplayer and are spectating random chickens at the moment. So if anyone can help i would apriciate the commands and what type of command block i need it in.
Thank you. First part helped. I see i have switched around on Targets and Targetobjectiv in my testiing. And we are opening a server later today for testing. So just in case, What if i only want one player to "jump around" to random players. But have other to be able to fly around as normal. Will it be as easy to use ("Username" For the name of the spectator camera username in the commmando):
/execute if score Timer YourScore matches 1 as @p"Username"[gamemode=spectator] run spectate @r
or
/execute if score Timer YourScore matches 1 as @a[gamemode=spectator] run spectate @r "Username"
I tested it with this on singleplayer and worked fine:
/execute if score Timer YourScore matches 200.. as @a[gamemode=spectator] run spectate @e[type=minecraft:chicken,sort=random,limit=1] "Myusername"
Hey, Can anyone help me with a problem i got. I want to use the </spectate @r "Spectator-Name"> at an intervall on 1.15 Java server
I have tried using scoreboards comands on repeating Command Blocks. But i only get it to count and not the reset or execute the /spectate command. But im guessing some of the commands i use is out of date. And i spent two days probably following a tutorial on commands blocks and not a single thing have worked.
With redstone reapeters and a simple command Block there is no problems. Im testing in singleplayer and are spectating random chickens at the moment. So if anyone can help i would apriciate the commands and what type of command block i need it in.
For detecting when to run the command an reset the score, one option would be to use "/execute if score..."
The resulting command sequence might look something like this:
/scoreboard players add Timer YourScore 1
/execute if score Timer YourScore matches 1 as @a[gamemode=spectator] run spectate @r
/execute if score Timer YourScore matches 200.. run scoreboard players set Timer YourScore 0
Another option would be to use the "scores" argument in your target selectors:
/scoreboard players add @a[gamemode=spectator] YourScore 1
/execute as @a[gamemode=spectator,scores={YourScore=1}] run spectate @r
/scoreboard players set @a[gamemode=spectator,scores={YourScore=200..}] YourScore 0
Let me know if this dose what you need
Thank you. First part helped. I see i have switched around on Targets and Targetobjectiv in my testiing. And we are opening a server later today for testing. So just in case, What if i only want one player to "jump around" to random players. But have other to be able to fly around as normal. Will it be as easy to use ("Username" For the name of the spectator camera username in the commmando):
/execute if score Timer YourScore matches 1 as @p"Username"[gamemode=spectator] run spectate @r
or
/execute if score Timer YourScore matches 1 as @a[gamemode=spectator] run spectate @r "Username"
I tested it with this on singleplayer and worked fine:
/execute if score Timer YourScore matches 200.. as @a[gamemode=spectator] run spectate @e[type=minecraft:chicken,sort=random,limit=1] "Myusername"