#start coords
scoreboard objectives add start_x dummy
scoreboard objectives add start_y dummy
scoreboard objectives add start_z dummy
scoreboard objectives add start_f dummy
scoreboard players set global start_x 29
scoreboard players set global start_y 81
scoreboard players set global start_z 18
scoreboard players set global start_f 3

#player coordinates
scoreboard objectives add player_x dummy
scoreboard objectives add player_y dummy
scoreboard objectives add player_z dummy

#no pushing please
team add nocollide
team modify nocollide collisionRule never

#add objectives
scoreboard objectives add carrotInput minecraft.used:minecraft.carrot_on_a_stick

scoreboard objectives add inputCooldown dummy
scoreboard objectives add playerID dummy
scoreboard objectives add currentPlayer dummy
scoreboard objectives add join dummy
scoreboard objectives add actionbarState dummy
scoreboard objectives add dummyID dummy
scoreboard objectives add input dummy

scoreboard objectives add currentLevel dummy
scoreboard objectives add levelEcho dummy
scoreboard objectives add levelLoading dummy

scoreboard objectives add xin dummy
scoreboard objectives add zin dummy
scoreboard objectives add ride dummy

scoreboard objectives add rot_yaw dummy
scoreboard objectives add rot_pitch dummy

scoreboard objectives add left_right dummy
scoreboard objectives add up_down dummy

scoreboard objectives add char_x dummy
scoreboard objectives add char_y dummy
scoreboard objectives add char_z dummy

scoreboard objectives add controlState dummy
scoreboard objectives add controlAnimate dummy
scoreboard objectives add char_set_x dummy
scoreboard objectives add char_set_y dummy
scoreboard objectives add char_set_z dummy
scoreboard objectives add char_set_face dummy
scoreboard objectives add active_x dummy
scoreboard objectives add active_z dummy
scoreboard objectives add charTimeout dummy

scoreboard objectives add dummy_x dummy
scoreboard objectives add dummy_y dummy
scoreboard objectives add dummy_z dummy
scoreboard objectives add mvmt_dx dummy
scoreboard objectives add mvmt_dz dummy

scoreboard objectives add true_x dummy
scoreboard objectives add true_y dummy
scoreboard objectives add true_z dummy
scoreboard objectives add true_set_face dummy

scoreboard objectives add lifespan dummy

scoreboard objectives add dCorrect dummy

scoreboard objectives add deathTime dummy
scoreboard objectives add haltMovement dummy
scoreboard objectives add faceDirection dummy
scoreboard objectives add lastDirection dummy

scoreboard objectives add validMove dummy
scoreboard objectives add validMoveXPOS dummy
scoreboard objectives add validMoveXNEG dummy
scoreboard objectives add validMoveZPOS dummy
scoreboard objectives add validMoveZNEG dummy
scoreboard objectives add moveCooldown dummy
scoreboard objectives add debugMode dummy

scoreboard objectives add moveCommit dummy
scoreboard objectives add moveCommitTime dummy
scoreboard objectives add moveCommitPrev dummy

scoreboard objectives add stickyBlock dummy
scoreboard objectives add linkedBlock dummy

scoreboard objectives add fastLoad dummy

scoreboard objectives add setLevel dummy
scoreboard objectives add victoryState dummy

scoreboard objectives add ambientTime1 dummy
scoreboard objectives add ambientCycle1 dummy
scoreboard objectives add ambientTime2 dummy
scoreboard objectives add ambientCycle2 dummy

scoreboard objectives add beepTime dummy
scoreboard objectives add checkForWin dummy
scoreboard objectives add hitCone dummy
scoreboard objectives add hitCone2 dummy

scoreboard objectives add hasArm dummy

scoreboard objectives add timer2sec dummy

scoreboard objectives add availableResets dummy
scoreboard objectives add recordNextReset dummy
scoreboard objectives add undoStackHead dummy

scoreboard objectives add exitEnabled dummy
scoreboard objectives add wonGame dummy
scoreboard objectives add dontRecordUndo dummy
scoreboard objectives add freecam dummy

scoreboard objectives add math dummy
scoreboard objectives add zoomLevel dummy
scoreboard objectives add puzzleSet dummy
scoreboard objectives add puzzleSetPrompt dummy

scoreboard objectives add levelExitValue dummy

#constants
scoreboard objectives add MOVECOMMITTIME dummy
scoreboard players set global MOVECOMMITTIME 4
#^ don't mess with this value unless you also adjust bd:movement/object/commit_... accordingly

#^also be warned that the timings for the bulldozer and other blocks were fine tuned so they don't cause issues
#example: there was a bug early in development where the bulldozer's movement time allowed it to...
# ...chase a moving ice block and clip inside of it before it became grid-aligned again