TransWikia.com

Points for Custom mob kills?

Arqade Asked by Dean Warren Powell on May 15, 2021

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

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

Answered by Arn on May 15, 2021

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.

Answered by xornob on May 15, 2021

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!

Answered by AoElite on May 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP