1

I need command help (testfor)

KGSteve's Avatar KGSteve10/23/16 10:07 pm
1 emeralds 518 7
10/25/2016 6:30 am
KGSteve's Avatar KGSteve
So I"m having a bit of an issue, I am making a game and there are six classes on each team, each with special abilites, to fit those catergories ive had to make each class its own personal team and when testing for all red classes, so I used this command:

testfor @a[r=12,team=!Blue6,team=!Blue5,team=!Blue4,team=!Blue3,team=!Blue2,team=!Blue1,]

And whenever its run, both me and my friend (each on separate teams) It gives a positive output, we believe that it might be too many teams, all teams have correct spelling and punctuation.
Posted by KGSteve's Avatar
KGSteve
Level 13 : Journeyman Engineer
13

Create an account or sign in to comment.

7

1
10/25/2016 6:30 am
Level 13 : Journeyman Engineer
KGSteve
KGSteve's Avatar
The problem has already been resolved, Thanks for helping anyways!
1
10/25/2016 6:28 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
Scores are not linked to anything, you can make a score called "ThisIsAScore" and test for it using score_ThisIsAScore= (tests for maximum) and score_ThisIsAScore_min= (tests for a minimum).
1
10/24/2016 9:09 am
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
Or for red:
/testfor @a[team=Red]

As long as you don't specify which "Red" score, you can testfor all Red classes
1
10/24/2016 2:45 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
You can only use one of each selector argument, using multiple team arguments just does not work and it will just look for the last one.
1
10/24/2016 9:07 am
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
This is right....

Instead of having multiple blue teams, you could give each person a score in a Blue scoreboard objective.

Assuming you want to testfor someone with a blue score of 5:

/testfor @a[team=Blue,score_Blue_min=5,score_Blue=5]
1
10/24/2016 9:33 pm
Level 13 : Journeyman Engineer
KGSteve
KGSteve's Avatar
Is there a way you could test for a score not specific to anything? like test for a player on any team that has a certain score?
1
10/24/2016 6:18 am
Level 13 : Journeyman Engineer
KGSteve
KGSteve's Avatar
well it worked when we looked for players who werent in two certain teams and it worked so i dont think that is the case but well look into it
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome