This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
hawkins627's profile picture

Scoreboard API?

Started by hawkins627, 28 May 2017 - 12:05 AM
hawkins627 #1
Posted 28 May 2017 - 02:05 AM
Is there a scoreboard API for computercraft command computers?
KingofGamesYami #2
Posted 28 May 2017 - 02:31 AM
commandsPlus includes support for some scoreboard commands.
ReBraLaCC #3
Posted 30 May 2017 - 05:50 AM
And ive made a whole api for making scoreboards, it is not the best but it does its job

http://www.computercraft.info/forums2/index.php?/topic/27862-command-pc-scoreboard-api/page__p__261363#entry261363
hawkins627 #4
Posted 30 May 2017 - 05:21 PM
What I am looking for are actual scoreboard variables that can be set and manipulated within a command computer.
KingofGamesYami #5
Posted 30 May 2017 - 05:28 PM
If you point me to a wiki page describing how to do such a thing with in-game commands I'll see what I can come up with.
hawkins627 #6
Posted 30 May 2017 - 06:09 PM
http://minecraft.gamepedia.com/Scoreboard

These are the commands I am looking at. They create and manipulate objectives based on in-game criteria. I am an educator who is using MinecraftEdu and ComputercraftEdu to come up with some new and interesting challenges for students.

Presently I am planning a cooperative map which will limit students' resource gathering and terraforming. I need a network of command blocks to do this: Multiple variables to track tool use/block breaking with hands, a dummy fatigue tracker, variables to increase fatigue based on the tracked tool use/block breaking by hand, and command blocks to dish out consequences of heightened fatigue, and timers to reduce fatigue over time.

This all can be done with command blocks and one computer running a timer, but it would be much nicer to be able to do this in a command computer if it were able to run scoreboard commands.
KingofGamesYami #7
Posted 30 May 2017 - 06:23 PM
All of those can be run (relatively) easily by simply using commands.exec directly or commands.scoreboard( … ). There are a couple which return data in a way that may be difficult to parse, however commandsPlus has already solved that.

So while there isn't specifically an API to do that, command computers are able to run any command and thus use the scoreboard commands.
hawkins627 #8
Posted 30 May 2017 - 08:01 PM
I did not know the scoreboard objectives are already in the command computer. Right now I am using Computercraft 1.74 and I am stuck with MinecraftEdu 1.7.10. This will have to get tested. Thank you!