Created
September 1, 2015 00:29
-
-
Save yrsegal/48b480bfe33100c258b1 to your computer and use it in GitHub Desktop.
A proof of concept for a 10hz (or theoretically, (20/x)hz) clock in github.com/destruc7i0n/OneCommand format.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Arbitrary definitions. Honestly, these could be whatever you wanted. | |
DEFINE: arbitraryname name | |
DEFINE: arbitraryobjective objective | |
# Required to set up the clock. | |
INIT: scoreboard objectives add $arbitraryobjective dummy | |
# An example of a 2 tick clock (aka 10hz), done by using conditional repeats. | |
# This command will remain constant no matter the tickspeed. | |
scoreboard players add $arbitraryname $arbitraryobjective 1 | |
# This command's number is the tickspeed of the clock, minus one. | |
scoreboard players test $arbitraryname $arbitraryobjective 1 | |
# This command will remain constant no matter the tickspeed, and will power all further commands as an originator. | |
COND:REPEAT:scoreboard players set $arbitraryname $arbitraryobjective 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment