How to create a command that kills a certain team only with a snowball [duplicate]

How to create a command that kills a certain team only with a snowball [duplicate] - Young focused artists working together with sketches
/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?



Best Answer

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.




Pictures about "How to create a command that kills a certain team only with a snowball [duplicate]"

How to create a command that kills a certain team only with a snowball [duplicate] - Diverse friends creating project together
How to create a command that kills a certain team only with a snowball [duplicate] - Young multiracial colleagues preparing for photo session in modern office
How to create a command that kills a certain team only with a snowball [duplicate] - Concentrated young man taking photos on professional camera during work in modern studio



How do you kill only one kind of entity?

If you want to kill a specific type of mob, use the parameter \u201c @e[type=<mob_type> \u201d. For example, \u201c /kill @e[type=skeleton] \u201d kills all skeletons.

How do you kill a certain entity with commands?

Typing just /kill will kill every entity in a loaded area, including your armor, stands, minecarts, and even your own player. To prevent killing your own player, make sure to limit the command from killing yourself as well. For example, /kill @e[type=! player] will kill every entity except for your own player.

What is the command to kill a specific mobs?

Minecraft kill command And to kill a certain type of mob, \u201c/kill @e[type=mobType]\u201d.

What is the command to kill zombies only?

It isn't that hard, but you don't actually need a Command Loop to get rid of the mobs. Simply do /gamerule doMobSpawning false and it will resolve it. After that, the only mobs that can still spawn are the ones spawned by you.



7 fun Snowball commands




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Anna Shvets, Vanessa Loring, Matheus Bertelli, Matheus Bertelli