I am working on a Pvp map and I need to make it to where every time someone gets a kill they earn a "Kill Coin" (Gold Nugget) can someone please help me?
How can I make it to where I don't have to constantly reset it?
Why would you want to not reset it? Do you want to keep track of how many kills they have as well? If so just make another objective of the same type and add a display name to it:
And finally, reset the objective so it can be used again:
/scoreboard players set @a[score_kills_min=1] kills 0
Just a tip: you should use 'remove' instead of 'set' for the final command. In the event the player gets two kills at the same time ('kills' of 2), they will only be credited for one since their score is set to 0 ('kills' = 0) instead of the more appropriate 1 ('kills' - 1):
Just a tip: you should use 'remove' instead of 'set' for the final command. In the event the player gets two kills at the same time ('kills' of 2), they will only be credited for one since their score is set to 0 ('kills' = 0) instead of the more appropriate 1 ('kills' - 1):
Then you need to look for a player with kills and give them the nugget:
And finally, reset the objective so it can be used again:
Why would you want to not reset it? Do you want to keep track of how many kills they have as well? If so just make another objective of the same type and add a display name to it: You could also display this on the screen using: Now when you hold tab, next to everyones name will be their kill count.
Just a tip: you should use 'remove' instead of 'set' for the final command. In the event the player gets two kills at the same time ('kills' of 2), they will only be credited for one since their score is set to 0 ('kills' = 0) instead of the more appropriate 1 ('kills' - 1):
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/
How do I make the Nugget have a custom name?
/give @a[score_kills_min=1] gold_nugget 1 0 {display:{Name"Awesome Name"}}
Change "Awesome Name" to any name you want
Thanks!
If I helped you, click this magical green button ! Gives me power!