I have created a game that is timed. It uses solely redstone/command blocks instead of a plugin but the only thing I can't figure out is how to say what their time is. I have it displayed on the sidebar and when they finish it stops the time. I want it to say the time in chat and then stop/reset the score. Everything is 100% automatic except somehow storing the score, which is why I want it to say it in chat.
I found this post from last year. Its sloppy, but it would serve my purpose. Most of the times are between 2000-15000 seconds. I just can't visualize what he is actually trying to explain.
Hi, thanks for the help!
I have come up with a method, however it doesn't tell the player the number all in one go like "8437549", it would tell the player:
"8 Million"
"4 Hundred Thousand"
"30 Thousand"
"7 Thousand"
"5 Hundred"
"40"
"9"
How this is done is by setting up command blocks which test for either 1,2,3,4,5,6,7,8 or 9 million with the command "@p[score_dcredit=1999999,score_dcredit_min=1000000]" (in that example it would be testing for 1 million, to test for the other millions it would just be the other numbers instead of the "1"). So, continuing with the example, if the deposited credit score did have 1(and only one as the maximum score is 1999999) then it would continue to power a series of command blocks which would firstly tell the player "1 Million", then remove 1 million from the dcredit score (I will explain why soon), and then add 1 million to a new score "ccredit" ( Counted Credit ). Then the same procedure is carried out, however this time with the 1 Hundred thousand number. 1 million had to be removed so that the command line "@p[score_dcredit=199999,score_dcredit_min=100000]" would work, if it wasn't removed the score would always be above the max score for the testing for the 1 hundred thousand. This is done all the way through from the million number to the first number, and then at the end the dcredit score is set to the ccredit score by continuously adding 1 to the dcredit score until the ccredit score reaches 0 (I'm not sure if there is a better way to do this, but it is the best I could come up with).
This method eliminates the need to have a command block for every single combination, but it still does require a lot of command blocks :/ .
I have created a game that is timed. It uses solely redstone/command blocks instead of a plugin but the only thing I can't figure out is how to say what their time is. I have it displayed on the sidebar and when they finish it stops the time. I want it to say the time in chat and then stop/reset the score. Everything is 100% automatic except somehow storing the score, which is why I want it to say it in chat.
I found this post from last year. Its sloppy, but it would serve my purpose. Most of the times are between 2000-15000 seconds. I just can't visualize what he is actually trying to explain.
In 1.8, you can use the /tellraw command to display a score in the chat with the "score" function. If you use * in place of the players' name, they will see their own score in the specified objective. For example, a player having a score of 300 in the "TIME" objective:
/tellraw @p ["Your score is: ",{score:{name:"*",objective:"TIME"}}]
Result: Your score is 300
If you're not using 1.8, then you'll need a command block for each score that the player can have, which would be 2000-15000 command blocks.
I found this post from last year. Its sloppy, but it would serve my purpose. Most of the times are between 2000-15000 seconds. I just can't visualize what he is actually trying to explain.
Quote from thecalster
Hi, thanks for the help!
I have come up with a method, however it doesn't tell the player the number all in one go like "8437549", it would tell the player:
"8 Million"
"4 Hundred Thousand"
"30 Thousand"
"7 Thousand"
"5 Hundred"
"40"
"9"
How this is done is by setting up command blocks which test for either 1,2,3,4,5,6,7,8 or 9 million with the command "@p[score_dcredit=1999999,score_dcredit_min=1000000]" (in that example it would be testing for 1 million, to test for the other millions it would just be the other numbers instead of the "1"). So, continuing with the example, if the deposited credit score did have 1(and only one as the maximum score is 1999999) then it would continue to power a series of command blocks which would firstly tell the player "1 Million", then remove 1 million from the dcredit score (I will explain why soon), and then add 1 million to a new score "ccredit" ( Counted Credit ). Then the same procedure is carried out, however this time with the 1 Hundred thousand number. 1 million had to be removed so that the command line "@p[score_dcredit=199999,score_dcredit_min=100000]" would work, if it wasn't removed the score would always be above the max score for the testing for the 1 hundred thousand. This is done all the way through from the million number to the first number, and then at the end the dcredit score is set to the ccredit score by continuously adding 1 to the dcredit score until the ccredit score reaches 0 (I'm not sure if there is a better way to do this, but it is the best I could come up with).
This method eliminates the need to have a command block for every single combination, but it still does require a lot of command blocks :/ .
In 1.8, you can use the /tellraw command to display a score in the chat with the "score" function. If you use * in place of the players' name, they will see their own score in the specified objective. For example, a player having a score of 300 in the "TIME" objective:
Result: Your score is 300
If you're not using 1.8, then you'll need a command block for each score that the player can have, which would be 2000-15000 command blocks.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
To make sure I got this right it would be
/tellraw @p ["Your score is: ",{score:{name:"Player",objective:"Time"}}]
I'll have it ready for when bukkit updates to 1.8.
I appreciate the help!
That's correct!
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
/tellraw @p {"text":"Your Balance is","color":"green","score":{"name":"@p","objective":"Money"}}
could you get this to work in 1.9
NVM i got it