Minecraft Blogs / Tutorial

Redstone Contraption - How To Change A Kill Count Into A Dummy Variable

  • 740 views, 3 today
  • 1
  • 0
Welpjesfinx's Avatar Welpjesfinx
Level 43 : Master Architect
39
For my upcoming project, I am making a scoreboard variable that gives you:
- 1 coin for each kill
- multiple coins for completing achievements

Now, there is a KillCount variable for scoreboards, but the amount of kills cannot be modified. 
That means that when you get 1 coin for each kill, you cannot add/substract coins for other actions.

So here is a small tutorial on how to create this system

1. Create a kill variable and a coin variable
/scoreboard objective add Coins dummy Coins 
/scoreboard objective add Kills totalKillCount Kills
/scoreboard objective setdisplay sidebar Coins

2. Create a system like in the picture
Command Block 1: /testfor @p[score_Kills_min=1,score_Kills=1]
Command Block 2: /scoreboard objective add @p Coins 1
Command Block 3: /scoreboard objective reset @p Kills
Link a comparator clock to Command Block 1 in order to keep testing for kills.
If you use the command /scoreboard objective add @p Coins 1 manually, it will add Coins, and when you make kills as well.

If you have any questions or remarks, please leave a comment below.
Subscribe for more redstone!
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome