2

I'm using scoreboard and what I have been trying to do is to give players a specific amount of points from killing a specific custom mob. The mob is customised with different health and a different name.

How can I record killings of this specific mob, and update the scoreboard with the appropriate number of points?

3 Answers 3

2

If you would make the custom mob you want to get points from killing, drop a specific item then you could execute off the item. Here is a example... Summon in the custom mob use a command like this:

/summon Zombie ~ ~1 ~ {CustomName:"Custom Zombie",CustomNameVisible:1,Equipment:[{},{},{id:redstone,Count:1,tag:{display:{Name:Point,Lore:[Point]}}},{},{}],DropChances:[0.085F,0.085F,2.0F,0.085F,0.085F]}

You also need a objective called point. /scoreboard objectives add point dummy Then you need a clock running the following commands in this order:

  1. scoreboard players set @e[type=Item] {Item:{id:redstone,tag:{display:{Name:"Point",Lore:[Point]}}}} point 1

  2. execute @e[type=Item,score_point_min=1,score_point=1] ~ ~ ~ scoreboard players add @p point 1

  3. kill @e[type=Item,score_point_min=1,score_point=1]

I would use this to summon in the custom mob you want. Hope this helps! If anything was wrong or anything was spelled wrong please tell me!

0

This may be a bit clunky but you could have the mob drop an item which could be taken away from the player immediately and then go towards a point system. Im sure you could also do it with a scoreboard system but I'm useless at that stuff

1
  • Na, thats not exactly what im looking for but its actually a good idea for another game i have in mind later :D Dec 16, 2014 at 7:57
0

Scoreboards can track the kills of specific types of entities.

/scoreboard objectives add < name > stat.killEntity.* < display name >

This increases when you kill a mob of type *. The list of entity types that can go in * are:

Bat, Blaze, CaveSpider, Chicken, Cow, Creeper, Enderman, Endermite, EntityHorse, Ghast, Guardian, LavaSlime, MushroomCow, Ozelot, Pig, PigZombie, Rabbit, Sheep, Silverfish, Skeleton, Slime, Spider, Squid, Villager, Witch, Wolf, and Zombie.

However, this method doesn't work if there are two enemies of the same type (2 zombies, 2 endermen). Note that spider is different than cave spider, zombie is different than zombie pigmen, and that skeleton is the same as wither skeleton.


To do the "point-giving" part:

Make an objective called points (or whatever you want)

/scoreboard objectives add points dummy

Then, set it so that players can see it:

/scoreboard objectives setdisplay * points

Possible values of *:

list: Displays next to the player name when holding [tab]. (doesn't work in singleplayer)

sidebar: Displays on the side of the screen.

belowName: Displays under the player name (floating above head, doesn't work in singleplayer)

These all work when opened to LAN and more than one player is on.

1
  • Exactly, thanks! but i have this problem, i have to push the button for it to count the score, i tried this repeating circuit trick and its very fast and repeats the whole command quickly but sometimes il kill the mob and the point wont get counted, most times it counts. and i am able to create mobs with custom names and health and many of the same, that worked fine :D Dec 16, 2014 at 7:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .