Ok Im building a Mini game that rewards all players of one of three teams an Item but I dont know how to write the commant properly or if I should use 2 command blocks one using the test for command
so far I know I should do the /give @a (give at all players) 266 2 (2 gold Ingots) but I dont know how to word it for teams like
/give @a(team_green) 266 2
the team names are team_black, team_red, and team_green and the Display names are Black Team, Red Team, Green Team any help would be appreciated
Edit***
Also I have been working on a score System that gives a player 1 score per Gold nugget they pay but I want them to Receive one ingot per nugget up to 4 so using the test for command shouldn't I do something like
/testfor green_team (min_score=1, Maxs_score=1) Im still very very new to this I think I have a working System that adds and Removes points with the Set score
/scoreboard players add @p Score 1
and
/scoreboard players set @p Score 0 to reset the score
Edit again I have the give command working but it gives all prizes to all players how would I word the score part
/give @a[Score_green_team_min=2,Score_green_team=2] 266 4
Ok Im building a Mini game that rewards all players of one of three teams an Item but I dont know how to write the commant properly or if I should use 2 command blocks one using the test for command
so far I know I should do the /give @a (give at all players) 266 2 (2 gold Ingots) but I dont know how to word it for teams like
/give @a(team_green) 266 2
the team names are team_black, team_red, and team_green and the Display names are Black Team, Red Team, Green Team any help would be appreciated
Edit***
Also I have been working on a score System that gives a player 1 score per Gold nugget they pay but I want them to Receive one ingot per nugget up to 4 so using the test for command shouldn't I do something like
/testfor green_team (min_score=1, Maxs_score=1) Im still very very new to this I think I have a working System that adds and Removes points with the Set score
/scoreboard players add @p Score 1
and
/scoreboard players set @p Score 0 to reset the score
Edit again I have the give command working but it gives all prizes to all players how would I word the score part
/give @a[Score_green_team_min=2,Score_green_team=2] 266 4
Parameters following a selector (@p, @a, or @r) should be encased in square brackets. To select a player on a specific team, you'll use "team=TEAMNAME". So, for example, your first /give command:
/give @a[team=green] 266 2
You can't have spaces between each parameter either. For selecting player with specific objective scores, you'll use "score_OBJECTIVENAME=", which is the maximum score, and/or "score_OBJECTIVENAME_min=", which is the minimum score. Keep in mind that objective names are case-sensitive. So your testfor should look like:
ok thats great now using the last line or the
/give @a[team=green,score_Score_min=2,score_Score=2] 266 4
will I still need a Test for Command? seeing as this gives all players the desired items without needing to already test? or does the testfor make this command work
ok thats great now using the last line or the
/give @a[team=green,score_Score_min=2,score_Score=2] 266 4
will I still need a Test for Command? seeing as this gives all players the desired items without needing to already test? or does the testfor make this command work
You're correct, you don't need the testfor in this case. The parameters in the /give will ensure that only the players matching the score and team anyway get the items.
you can use score based teams instead of actual teams
first you use the command:
/scoreboard objectives add TEAMNAME dummy
then you put this command in a command block( in a closed room with the people you want for the team of course)
scoreboard players add @a[r=6] TEAMNAME1
and when you want to give the reward use this command
/give @a[score_TEAMNAME_min=1] 266 2
you can use score based teams instead of actual teams
first you use the command:
/scoreboard objectives add TEAMNAME dummy
then you put this command in a command block( in a closed room with the people you want for the team of course)
scoreboard players add @a[r=6] TEAMNAME1
and when you want to give the reward use this command
/give @a[score_TEAMNAME_min=1] 266 2
I know that much but I need each person to represent themselves as they bet gold ingots for the game at the end the "score" is for the return of prizes for the winning team 1 ingot gives 1 point then the players play and at the end 1 point = 2 ingots for the winning team only once I am finished setting it up you will see why
so far I know I should do the /give @a (give at all players) 266 2 (2 gold Ingots) but I dont know how to word it for teams like
/give @a(team_green) 266 2
the team names are team_black, team_red, and team_green and the Display names are Black Team, Red Team, Green Team any help would be appreciated
Edit***
Also I have been working on a score System that gives a player 1 score per Gold nugget they pay but I want them to Receive one ingot per nugget up to 4 so using the test for command shouldn't I do something like
/testfor green_team (min_score=1, Maxs_score=1) Im still very very new to this I think I have a working System that adds and Removes points with the Set score
/scoreboard players add @p Score 1
and
/scoreboard players set @p Score 0 to reset the score
Edit again I have the give command working but it gives all prizes to all players how would I word the score part
/give @a[Score_green_team_min=2,Score_green_team=2] 266 4
Parameters following a selector (@p, @a, or @r) should be encased in square brackets. To select a player on a specific team, you'll use "team=TEAMNAME". So, for example, your first /give command:
You can't have spaces between each parameter either. For selecting player with specific objective scores, you'll use "score_OBJECTIVENAME=", which is the maximum score, and/or "score_OBJECTIVENAME_min=", which is the minimum score. Keep in mind that objective names are case-sensitive. So your testfor should look like:
Your add and set commands are correct. And for your final /give:
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/
/give @a[team=green,score_Score_min=2,score_Score=2] 266 4
will I still need a Test for Command? seeing as this gives all players the desired items without needing to already test? or does the testfor make this command work
You're correct, you don't need the testfor in this case. The parameters in the /give will ensure that only the players matching the score and team anyway get the items.
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/
first you use the command:
/scoreboard objectives add TEAMNAME dummy
then you put this command in a command block( in a closed room with the people you want for the team of course)
scoreboard players add @a[r=6] TEAMNAME1
and when you want to give the reward use this command
/give @a[score_TEAMNAME_min=1] 266 2
I know that much but I need each person to represent themselves as they bet gold ingots for the game at the end the "score" is for the return of prizes for the winning team 1 ingot gives 1 point then the players play and at the end 1 point = 2 ingots for the winning team only once I am finished setting it up you will see why