1

Comparator Capture Point

Statistical's Avatar Statistical7/22/13 10:42 pm
1 emeralds 875
I haven't seen enough posts that use comparators on the redstone board, so here's a capture point design I made:
Capture Point


The Capture Point will automatically increase in signal strength by the number of attackers and decrease by the number of defenders at the set coordinates. Additionally the capture point will automatically decrease its signal strength by a custom amount if no players are at the set coordinates. The capture speed can also be changed.

I'll explain how it works.

1: Memory Cell
It uses a hexadecimal memory cell to store the current signal strength (0-15) that is output to the redstone lamps.
Memory Cell


2: Adder (attacking team)
Comparators only have a subtraction mode so adding to a redstone signal can be a bit tricky. The most basic way to accomplish this (as shown here) is to invert the signal twice. Take the redstone signal from the memory cell and invert it(see image). Then subtract the amount you want to add from the inverted signal. This capture point uses a command block to determine the amount to add. The command should look something like "/testfor @a[x,y,z,r,team]" without quotes. Then invert the signal again and output it into the memory cell(see image). You can add any amount from 0-15 using this method although the output will never exceed 15.
Addition


3: Subtraction (defending team)
This part is simple. Set one of the comparators on the memory cell to subtraction mode and hook up the command block to the other end. The command should look something like "/testfor @a[x,y,z,r,team]" without quotes. In the picture the command block is arranged so the automatic depletion (the hopper) can occur. The more items you put in the hopper the more it will automatically subtract.
Subtraction


4: Hooking it up
Now we need to connect the input line to the command blocks (so they update) and the addition/subtraction modules. (green line: see image) The red line is used to stop the automatic depletion when players are standing on it. Otherwise the attacking team would need more players than the amount it subtracts in order to capture it. Finally connect the memory cell to the redstone lamps/output by extending it with a comparator out the front.
All Hooked Up


5: The clock
The final thing we need to do is hook the contraption up to a clock.(not shown) The input (to the green line) must be 2 redstone ticks long. The slower the clock the slower the point will capture and vice versa.

It's done! I hope this is helpful to some of you. If you have any questions I'll be glad to answer them. I also made a more compact version, but it's not good for pictures.
Compact Version
Posted by Statistical's Avatar
Statistical
Level 38 : Artisan Electrician
52

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome