• 0

    posted a message on Scoreboard operation on @a?

    so frustrating ... all I want to do is divide by 4 :(

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Scoreboard operation on @a?
    Quote from Skylinerw»


    What version are you using and are you using vanilla? If you're not in vanilla, then that would be why.


    Can't really run a server properly with vanilla ... I use spigot.
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Scoreboard operation on @a?
    Quote from Skylinerw»


    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):

    /execute @a[r=100] ~ ~ ~ /scoreboard players operation @a[c=1] objective1 %= @a[c=1] objective2


    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
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Scoreboard operation on @a?

    thanks, I will try that .... I am still getting used to the execute command

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Scoreboard operation on @a?
    Quote from Skylinerw»

    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.


    So how can I deal with it?
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Scoreboard operation on @a?

    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

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Global price variables

    nvm ... did a little googling and I think i figured it out

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Global price variables
    Quote from JannisX11»


    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!

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Global price variables

    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

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How to tag crops?

    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

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How to tag crops?

    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

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Inventory testing
    Quote from Skylinerw»

    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.

    Thanks!
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Inventory testing

    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

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Tilde notation issue?
    Quote from PlatinumHydra»



    It wont work if you just have [0,0,0,1], you have to have the x y z and r


    I think lol


    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.
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on Tilde notation issue?

    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.

    Posted in: Redstone Discussion and Mechanisms
  • To post a comment, please .