If you want players to modify their own score based on their own score, you'd need to use /execute such that each player is running an operation, and can target themselves (fulfilling the single-target requirement):
I tried it, same issue as before. Works fine with 1 person in the world, completely fails when someone else is around.
This happens whether I use the 3 @a selectors, and it also happens using the dummy player i had in the original. I tried switching to a new objective made just for this and still no luck.
So yeah, thanks but maybe I am typing something wrong or something. Anyways, doesn't work, but thanks
The presented command works fine with multiple targets. Keep in mind that one of the targets in the command must resolve to a single target in order for the command to succeed. Since you're using a fake player for the second target, that requirement is fulfilled, but if you're swapping it out for a selector that targets multiple entities, then it'll fail if the first one selects multiple players.
I am creating a farming mini-game. I would like people to be able to sell items for points. I have a system that works with command blocks that have a specific price for each item, but if I want to change prices, it involves going around to each command block and manually editing it.
Is there a way to set prices like this with a global variable? Is it possible with gamerule variables for instance? I don't know enough about them to make it work.
I am creating a minigame. I would like to tag crops for specific players using the target selectors. So if a player has a certain objective, any crops he plants would be tagged with a label (this is so the crops can be removed later.) I am not sure how this would work since I don't know if blocks can be tagged in the same way as entities, but if anyone knows please let me know
You can label players that have a full inventory by checking their "Inventory" tag for every slot possible:
Thank you, this seems to work, but how can I remove the armor and weapon slots? Which numbers are they?
Also, can you recommend a good json tutorial for minecraft? The googles is not very helpful for what I have searched for. i am looking for a full list of all NBT references that can be used and a simple description of how to use them.
Is there any way to tell if a player has a full inventory? /give {player} item 1 always succeeds even if the player has a full inventory. I would like something that fails when the player is not given an item successfully. This is to go with a minigame where players pay for items with points and I need a way to stop the points from being deducted if they are not receiving items.
And similarly, is there any way to tell if a player has one empty inventory slot (any slot other than armor.) Preferably in 1 or 2 command blocks and not checking each and every slot individually.
The reason i don't want to use a radius only is that there will be a chain of command blocks and they will all be at further distances from the original block. So I really don't want to end up with a radius of more than 5 since this risks other players being affected. And since I might have to install a lot of these things i really didn't want exact coords due to the amount of work.
0
so frustrating ... all I want to do is divide by 4
0
Can't really run a server properly with vanilla ... I use spigot.
0
I tried it, same issue as before. Works fine with 1 person in the world, completely fails when someone else is around.
This happens whether I use the 3 @a selectors, and it also happens using the dummy player i had in the original. I tried switching to a new objective made just for this and still no luck.
So yeah, thanks but maybe I am typing something wrong or something. Anyways, doesn't work, but thanks
0
thanks, I will try that .... I am still getting used to the execute command
0
So how can I deal with it?
0
How can I get a command block to perform a scoreboard operation on multiple players?
I am using
/scoreboard players operation @a[r=100] objective1 %= dummyplayer objective2
Works just fine when there is only one player, but does nothing when there is more than one player.
I really don't want to brute force this. Please let me know if there is a better way to simultaneously perform an operation on @a players
Thanks
0
nvm ... did a little googling and I think i figured it out
0
I think that should work nicely, thank you
Can you think of a way to display the price in a message to a player?
like /msg @p The price of potatoes is {potato: price}
I don't speak json
Thanks again!
0
Hello,
I am creating a farming mini-game. I would like people to be able to sell items for points. I have a system that works with command blocks that have a specific price for each item, but if I want to change prices, it involves going around to each command block and manually editing it.
Is there a way to set prices like this with a global variable? Is it possible with gamerule variables for instance? I don't know enough about them to make it work.
Thanks
0
Yeah, I knew about the stat command, just didn't know if there was a way to add an nbt tag to a block ... oh well
thanks all the same
0
I am creating a minigame. I would like to tag crops for specific players using the target selectors. So if a player has a certain objective, any crops he plants would be tagged with a label (this is so the crops can be removed later.) I am not sure how this would work since I don't know if blocks can be tagged in the same way as entities, but if anyone knows please let me know
Thanks
0
Thank you, this seems to work, but how can I remove the armor and weapon slots? Which numbers are they?
Also, can you recommend a good json tutorial for minecraft? The googles is not very helpful for what I have searched for. i am looking for a full list of all NBT references that can be used and a simple description of how to use them.
Thanks!
0
2 linked questions:
Is there any way to tell if a player has a full inventory? /give {player} item 1 always succeeds even if the player has a full inventory. I would like something that fails when the player is not given an item successfully. This is to go with a minigame where players pay for items with points and I need a way to stop the points from being deducted if they are not receiving items.
And similarly, is there any way to tell if a player has one empty inventory slot (any slot other than armor.) Preferably in 1 or 2 command blocks and not checking each and every slot individually.
Thanks
0
Sorry, but that would only work if I was at coordinates 0,0,0. Please check the wiki if you are unfamiliar with tilde notations.
0
The reason i don't want to use a radius only is that there will be a chain of command blocks and they will all be at further distances from the original block. So I really don't want to end up with a radius of more than 5 since this risks other players being affected. And since I might have to install a lot of these things i really didn't want exact coords due to the amount of work.