I have a non-existent player that I'm using to keep scores consistent on servers. I can set the score of "player," but I cannot test for that player. For example,
/scoreboard players set fakeplayer testobjective 1234
works, but
/testfor fakeplayer[score_testobjective=1234]
does not. Using the @a selector if only fakeplayer has an entry will always turn the comparator on, no matter what the score actually is. If another player has an entry, then that player will be examined instead, as the fakeplayer is not online.
I heard of using * to select all players, but that causes massive lag for me. The new snapshot says something about using #fakeplayer to denote a fake player, but I can't figure out how it works.
Basically, I'm trying to create a variable that will work no matter who is online, as people logging in and out will produce inconsistencies in scoreboard entries. I'm trying to testfor a specific player and a specific score, even if said player is offline.
I have a non-existent player that I'm using to keep scores consistent on servers. I can set the score of "player," but I cannot test for that player. For example,
/scoreboard players set fakeplayer testobjective 1234
works, but
/testfor fakeplayer[score_testobjective=1234]
does not. Using the @a selector if only fakeplayer has an entry will always turn the comparator on, no matter what the score actually is. If another player has an entry, then that player will be examined instead, as the fakeplayer is not online.
I heard of using * to select all players, but that causes massive lag for me. The new snapshot says something about using #fakeplayer to denote a fake player, but I can't figure out how it works.
Basically, I'm trying to create a variable that will work no matter who is online, as people logging in and out will produce inconsistencies in scoreboard entries. I'm trying to testfor a specific player and a specific score, even if said player is offline.
The /testfor command doesn't support testing for offline players. Instead, you can use the new function within the /scoreboard command in 14w07a:
/scoreboard players test <player> <objective> <min> <max>
If the player is a fake player, you prefix the <player> with the # symbol. For example:
/scoreboard players test #fakeplayer testobjective 0 1234
The command block will output a signal if true, and no signal if false. So you can now finally test for fake player scores! The # symbol only prevents the fake player from being displayed on scoreboard displays, such as the sidebar. So it's not required if they don't exist on an objective has its display set to the sidebar.
The /testfor command doesn't support testing for offline players. Instead, you can use the new function within the /scoreboard command in 14w07a:
/scoreboard players test <player> <objective> <min> <max>
If the player is a fake player, you prefix the <player> with the # symbol. For example:
/scoreboard players test #fakeplayer testobjective 0 1234
The command block will output a signal if true, and no signal if false. So you can now finally test for fake player scores! The # symbol only prevents the fake player from being displayed on scoreboard displays, such as the sidebar. So it's not required if they don't exist on an objective has its display set to the sidebar.
Skyliner...are you going to give us a tutorial on these new commands??
Some of them make little sense to me...the adding of arithmetic to commands especially.
Basically, I'm trying to create a variable that will work no matter who is online, as people logging in and out will produce inconsistencies in scoreboard entries. I'm trying to testfor a specific player and a specific score, even if said player is offline.
Could you be a little more specific? I might be able to help you do this in the current version if I could get more details.
Skyliner...are you going to give us a tutorial on these new commands??
Some of them make little sense to me...the adding of arithmetic to commands especially.
I will, but it's likely to be much later today or early tomorrow.
Could you be a little more specific? I might be able to help you do this in the current version if I could get more details.
He's attempting to use fake players to track scores without having to rely on a player being online. For example, you can track a fake player by simply creating your own name in place of the 'player' argument:
/scoreboard players set FAKEPLAYER objectiveName 0
That will add a player by the name of "FAKEPLAYER" to the scoreboard. Of course, if a player logs in with that name, they'll be the target of such scores.
For 1.7.4, you cannot detect the current score of a fake player. You can only manipulate it directly. The player selectors, being @a, only check the online list, while the intended fake player doesn't actually exist and thus isn't in the online list. So there is no way to detect fake player scores in any version prior to 14w07a.
He's attempting to use fake players to track scores without having to rely on a player being online. For example, you can track a fake player by simply creating your own name in place of the 'player' argument:
I was hoping for an explanation of the precise setup here. I had similar problems when making a team randomizer but got around them, so the answer is pretty situational I think.
/scoreboard players set fakeplayer testobjective 1234
works, but
/testfor fakeplayer[score_testobjective=1234]
does not. Using the @a selector if only fakeplayer has an entry will always turn the comparator on, no matter what the score actually is.
You're missing a a _min in there. If you just use testfor fakeplayer(score_objective=1234) you're going to get all results UP to 1234. Combine this with score_objective_min=1234 and you'll only get a result when there's an exact match.
Now, I ask for more info because you could be asking to literally search for a specific player and score (seems like it) or have the option to search for any specific player and score. I'm not sure by your wording though.
there is no command in minecraft that test for your fakeplayer not even in 14w.07a. but when i do this it said /scoreboard players <set;add;remve;reset;list
i am currently playing on 1.5 and that is after 14w.07a
so that dont work?!!!
14w07a is a snapshot version for 1.8. 1.5 does not come after this; you will not be able to accomplish this without the use of 1.8, which is still in its development stages (thus unstable).
Incase anyone else has this problem, what you can do (which I commonly use) is you can trap a cow and name it, then add the score to @e[type=Cow,name=NAME] and test for @e[type=Cow,name=NAME,score_SCORE_min=1]. Just incase anyone else wants to know.
I was hoping for an explanation of the precise setup here. I had similar problems when making a team randomizer but got around them, so the answer is pretty situational I think.
You're missing a a _min in there. If you just use testfor fakeplayer(score_objective=1234) you're going to get all results UP to 1234. Combine this with score_objective_min=1234 and you'll only get a result when there's an exact match.
Now, I ask for more info because you could be asking to literally search for a specific player and score (seems like it) or have the option to search for any specific player and score. I'm not sure by your wording though.
Do you know how I would be able to do that with Lives? What I am trying to when a Decoy player reaches 0 lives it will tp everyone to spawn and says who wins and what not. I just need the testfor to complete my freaking mini-game PLEASE! xD
works, but
does not. Using the @a selector if only fakeplayer has an entry will always turn the comparator on, no matter what the score actually is. If another player has an entry, then that player will be examined instead, as the fakeplayer is not online.
I heard of using * to select all players, but that causes massive lag for me. The new snapshot says something about using #fakeplayer to denote a fake player, but I can't figure out how it works.
Basically, I'm trying to create a variable that will work no matter who is online, as people logging in and out will produce inconsistencies in scoreboard entries. I'm trying to testfor a specific player and a specific score, even if said player is offline.
The /testfor command doesn't support testing for offline players. Instead, you can use the new function within the /scoreboard command in 14w07a:
If the player is a fake player, you prefix the <player> with the # symbol. For example:
The command block will output a signal if true, and no signal if false. So you can now finally test for fake player scores! The # symbol only prevents the fake player from being displayed on scoreboard displays, such as the sidebar. So it's not required if they don't exist on an objective has its display set to the sidebar.
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/
Skyliner...are you going to give us a tutorial on these new commands??
Some of them make little sense to me...the adding of arithmetic to commands especially.
Could you be a little more specific? I might be able to help you do this in the current version if I could get more details.
I will, but it's likely to be much later today or early tomorrow.
He's attempting to use fake players to track scores without having to rely on a player being online. For example, you can track a fake player by simply creating your own name in place of the 'player' argument:
That will add a player by the name of "FAKEPLAYER" to the scoreboard. Of course, if a player logs in with that name, they'll be the target of such scores.
For 1.7.4, you cannot detect the current score of a fake player. You can only manipulate it directly. The player selectors, being @a, only check the online list, while the intended fake player doesn't actually exist and thus isn't in the online list. So there is no way to detect fake player scores in any version prior to 14w07a.
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/
I was hoping for an explanation of the precise setup here. I had similar problems when making a team randomizer but got around them, so the answer is pretty situational I think.
You're missing a a _min in there. If you just use testfor fakeplayer(score_objective=1234) you're going to get all results UP to 1234. Combine this with score_objective_min=1234 and you'll only get a result when there's an exact match.
Now, I ask for more info because you could be asking to literally search for a specific player and score (seems like it) or have the option to search for any specific player and score. I'm not sure by your wording though.
14w07a is a snapshot version for 1.8. 1.5 does not come after this; you will not be able to accomplish this without the use of 1.8, which is still in its development stages (thus unstable).
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/
Do you know how I would be able to do that with Lives? What I am trying to when a Decoy player reaches 0 lives it will tp everyone to spawn and says who wins and what not. I just need the testfor to complete my freaking mini-game PLEASE! xD