Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@yrsegal
Created September 1, 2015 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yrsegal/48b480bfe33100c258b1 to your computer and use it in GitHub Desktop.
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.
# 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