The Meaning of Life, the Universe, and Everything.
Join Date:
8/25/2012
Posts:
56
Member Details
So I want to make some thing happen to a user when they first join, I believe you are supposed to use teams, but I also want more teams, like blue and red.
This is the command I made up, I know it works, but if I join another team, it will make me join the team finished again.
/scoreboard teams join fJoin @a[team=!finished]
fJoin is the first join actions team, so I do the actions then I send the player into team finished, but I also want to have other teams like blue and red, if they join blue, they will no longer be in finished and they will no longer be in team blue, then will be in finished, is there any way to fix this?
You may be better off using scores instead of an introductory team then.
/scoreboard objectives add fJoin dummy
Since players are not automatically tracked on the scoreboard, you'll need to force them to be tracked. The following command does so without changing the score of other players that are already tracked:
/scoreboard players add @a fJoin 0
You can then target players with an 'fJoin' score of 0, which indicates they have just joined:
/scoreboard teams join @a[score_fJoin=0] blue
After you've completed all the necessary tasks towards new players, you can set their 'fJoin' score to 1, preventing them from being targeted by the initial commands in the future:
So I want to make some thing happen to a user when they first join, I believe you are supposed to use teams, but I also want more teams, like blue and red.
This is the command I made up, I know it works, but if I join another team, it will make me join the team finished again.
/scoreboard teams join fJoin @a[team=!finished]
fJoin is the first join actions team, so I do the actions then I send the player into team finished, but I also want to have other teams like blue and red, if they join blue, they will no longer be in finished and they will no longer be in team blue, then will be in finished, is there any way to fix this?
You may be better off using scores instead of an introductory team then.
Since players are not automatically tracked on the scoreboard, you'll need to force them to be tracked. The following command does so without changing the score of other players that are already tracked:
You can then target players with an 'fJoin' score of 0, which indicates they have just joined:
After you've completed all the necessary tasks towards new players, you can set their 'fJoin' score to 1, preventing them from being targeted by the initial commands in the future:
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
Thanks!