0

I'm trying to make a contraption that will set a players score to another score, then raise the 2nd score so that the next player to do the action will have the same as the first player +1.

My command so far is:

/scoreboard players set @a[r=3,score_RoomID_min=0,score_RoomID=0] RoomID

I need to add something to the end that can set the RoomID score to Rooms, then have a separate command blocks adding 1 to Rooms.

1 Answer 1

1

To set the "RoomID" score equal to "Rooms" you would do this:

scoreboard players operation <player> RoomID = <player> Rooms

with <player> being a player either by username, target selector or *, to select all players.

To add one to the "Rooms" score you would do this:

scoreboard players add <player> Rooms 1

Again, <player> being a player either by username, target selector or *, to select all players.

3
  • 1
    To be more specific, * does not select all players, it selects every name stored on the scoreboard (be it a player name, entity UUID, or fake player name). That means if a player is online but is not tracked at all on the scoreboard, they will not have their score modified. Since it sets the score for all tracked "players", it would potentially bloat the scoreboard with unnecessary records if there are names you don't need tracked in the objective.
    – Skylinerw
    Sep 25, 2016 at 16:05
  • To add upon @Skylinerw, @a would select all players within the world. Sep 25, 2016 at 17:27
  • @Ethan_Chapman Then it is best to use @a instead of *.
    – Daniel G
    Sep 28, 2016 at 11:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .