1
So I have a very basic problem, but my broad knowledge of command blocks cannot reach this one subject: Scoreboards. So recently I have been making a map where you are teleported into an arena, then invisible ghasts will fly around and you need to kill them by knocking their fireballs back at them. So there are custom villagers that will sell you stuff for golden nuggets, but I do not know how to give someone a golden nugget every time they kill a ghast. I already have the scoreboard set up so a sidebar shows up telling you the amount of ghasts you have killed, but how do I give a player a golden nugget for every ghast they kill? I love any response and I will try all!
Thanks,
~Stagnate
Thanks,
~Stagnate
5
I'd like to add onto the previous idea:
1) Set up 2 scoreboards:
/scoreboard objectives add GhastsKilled stat.killEntity.Ghast
/scoreboard objectives add nugget stat.killEntity.Ghast
2) Make a clock and have these two commands in this order (similar to the 1st idea):
/give @a[score_nugget_min=1] gold_nugget 1
/scoreboard players set @a[score_nugget_min=1] nugget 0
3) Enter this command for display only:
/scoreboard objectives setdisplay sidebar GhastsKilled
And you should be good to go!
Let me know how it goes!
1) Set up 2 scoreboards:
/scoreboard objectives add GhastsKilled stat.killEntity.Ghast
/scoreboard objectives add nugget stat.killEntity.Ghast
2) Make a clock and have these two commands in this order (similar to the 1st idea):
/give @a[score_nugget_min=1] gold_nugget 1
/scoreboard players set @a[score_nugget_min=1] nugget 0
3) Enter this command for display only:
/scoreboard objectives setdisplay sidebar GhastsKilled
And you should be good to go!
Let me know how it goes!
Wait nevermind about my last reply! I just thought of the idea of making another scoreboard with the same objective! Thank you so much with the command though!
Please tell me if you have any other ideas!
Please tell me if you have any other ideas!
Hello Tedk, the command worked out great! I just have one small problem. I would like it so all of the other players can see how many ghast kills you've gotten, do you know how to fix that? Thank you for the command though! If we can't find a remedy towards this, it's okay if I don't have a side bar.
Hi, what you can do here is have another objective that also adds one for every ghast you kill, for example: ghastKills.
From here, you have a command block circuit spamming the following two commands in sequential order:
give @a[score_ghastKills_min=1] gold_nugget 1
The second command:
scoreboard players reset @a ghastKills
Let me know if anything is unclear. Hope I helped.
From here, you have a command block circuit spamming the following two commands in sequential order:
give @a[score_ghastKills_min=1] gold_nugget 1
The second command:
scoreboard players reset @a ghastKills
Let me know if anything is unclear. Hope I helped.
To sum it up I just basically need to know how to give a player a golden nugget once they have killed a ghast.
