0
/execute @e[type=Snowball] ~ ~ ~ /kill @a[score_Hider_min=1,r=3]

The above is the command I'm using. This is running on a loop and I'm trying to use it to kill people that have that score. Is there a way to do this just based on what team they are on?

1
  • There's a variable for which team someone's on, right? Commented Jan 18, 2016 at 20:50

1 Answer 1

3

The team parameter allows you to target based on the scoreboard team:

/execute @e[type=Snowball] ~ ~ ~ /kill @a[score_Hider_min=1,r=3,team=TeamName]

Alternatively, you can target players that are not on that team (including those not on any team):

/say @a[team=!TeamName]

By leaving the value blank, you can target players not on any team.

/say @a[team=]

And by using the NOT operator with a blank value, you can target players on any team.

/say @a[team=!]

The wiki has a list of target selector parameters here.

Not the answer you're looking for? Browse other questions tagged or ask your own question.