so i want to make a game where the players kill mobs with a bow. For each sheep they kill they get 1 point for each pig they get 5 points. Its been a long time since i did anything with commandblocks can somene help me please ?
This is super late, but this is possible by creating a dummy scoreboard (your final score) and then adding different values to that whenever a player kills a mob. The following should work:
You'll also need to make sure that every player is tracked by each of these scoreboards (so add a score of zero for each objective to every player).
Repeating nonconditional:
/execute if entity @a[scores={pigKill=1}] run scoreboard players add @a[scores={pigKIll=1}] finalScore 5
Chain conditional (attached to the previous block):
/scoreboard players set @a[scores={pigKill=1}] pigKill 0
Repeating nonconditional:
/execute if entity @a[scores={sheepKill=1}] run scoreboard players add @a[scores={sheepKill=1}] add finalScore 1
Chain conditional (attached to the previous block):
/scoreboard players set @a[scores={sheepKill=1}] sheepKill 0
This should function to test for whenever a player kills either a pig or sheep and add different scores to the finalScore objective. As a note, this doesn't specifically trigger on only bow kills but that could be added if needed. Hope this helps.
so i want to make a game where the players kill mobs with a bow. For each sheep they kill they get 1 point for each pig they get 5 points. Its been a long time since i did anything with commandblocks can somene help me please ?
This is super late, but this is possible by creating a dummy scoreboard (your final score) and then adding different values to that whenever a player kills a mob. The following should work:
Setup:
You'll also need to make sure that every player is tracked by each of these scoreboards (so add a score of zero for each objective to every player).
Repeating nonconditional:
Chain conditional (attached to the previous block):
Repeating nonconditional:
Chain conditional (attached to the previous block):
This should function to test for whenever a player kills either a pig or sheep and add different scores to the finalScore objective. As a note, this doesn't specifically trigger on only bow kills but that could be added if needed. Hope this helps.