Trying to create a scoreboard in a realm for total distance traveled in Meters (Km preferable). This includes combining all ‘minecraft.custom:minecraft.[movement type]_one_cm’.
I’ve started off by trying to get ‘minecraft.custom:Minecraft.walk_one_cm’ to reset every 100 points with:
'execute as @a if score @s Distance_in_cm matches 100.. run scoreboard players set @s Distance_in_cm 0'
and add one score to a dummy scoreboard (distance in m) with:
'execute as @a if score @s Distance_in_cm matches 100.. run scoreboard players add @s Distance_in_m 1'
the problem is that the Distance_in_cm score blows past 100 and doesn’t reset, nor add one point to Distance_in_m. I presume because the points go up so fast. Ive used these exact lines of command to set up a Time_played and a Time_since_death scoreboard so im unsure why they are not working.
I have also created a scoreboard for most individual movement types I want included (want to be able to add more in future as world progresses), but struggle to combine them into one score to be counted up.
The creation of the objectives wasn't hard, but when I try to implement the working system through command blocks (Repeat, unconditional, always active), it says that no entity was found for all of them. I've only been learning command blocks for the last two days, so I might need some more direction on how to properly set these up.
Also, I may have not specified, but I would like to have total distance traveled, but keeping players total separate (as to see who has traveled the furthest).
The first step is to build a command block chain. If you don't know what that is, it's basically a repeating command block and some chain command blocks attached to it. I've included a screenshot that shows you how to place the command blocks.
After you've done that, you can set all of the chain command blocks to always-active and unconditional. The repeating command block should stay off until all the commands are in place. Now, simply paste the commands in (the order is important) and activate the repeating command block.
To keep track of the total distance, add another chain command block before the last chain command block and paste this command in:
/execute as @a[scores={meters=1000..}] run scoreboard players add total km 1
This will add a new line to the scoreboard that says "total <total_distance>".
Hello, would there be a way to combine *every* movement type distance together into one m/km output number? Like exactly what you, Megacrafter107, already made up there with the command blocks, but add crouch/fly/boat/horse etc into the total all at the same time? I imagine there's gotta be at least some way to do it.
Hello, would there be a way to combine *every* movement type distance together into one m/km output number? Like exactly what you, Megacrafter107, already made up there with the command blocks, but add crouch/fly/boat/horse etc into the total all at the same time? I imagine there's gotta be at least some way to do it.
Thank you for your time.
You would have to modulise each type of distance and then add its output to the total distance travelled
Sweet, how would I go about doing that? I did the world download so I could look at the commands, but had no idea what I was looking at. It didn't look like the commands were directly tied to the walk/sprint scoreboard, but they were? I'm very new to command blocks like these, so I'm sorry in advance. But I appreciate the help non-the less
Trying to create a scoreboard in a realm for total distance traveled in Meters (Km preferable). This includes combining all ‘minecraft.custom:minecraft.[movement type]_one_cm’.
I’ve started off by trying to get ‘minecraft.custom:Minecraft.walk_one_cm’ to reset every 100 points with:
'execute as @a if score @s Distance_in_cm matches 100.. run scoreboard players set @s Distance_in_cm 0'
and add one score to a dummy scoreboard (distance in m) with:
'execute as @a if score @s Distance_in_cm matches 100.. run scoreboard players add @s Distance_in_m 1'
the problem is that the Distance_in_cm score blows past 100 and doesn’t reset, nor add one point to Distance_in_m. I presume because the points go up so fast. Ive used these exact lines of command to set up a Time_played and a Time_since_death scoreboard so im unsure why they are not working.
I have also created a scoreboard for most individual movement types I want included (want to be able to add more in future as world progresses), but struggle to combine them into one score to be counted up.
If you could please help me, that’d be awesome!
It doesn't add 1 to Distance_in_m because Distance_in_cm needs to be 100 or more, but the previous command sets it to 0.
Here is a working system:
The objectives are:
Command block engineer // Developer // #TeamTrees
Thanks for the reply,
The creation of the objectives wasn't hard, but when I try to implement the working system through command blocks (Repeat, unconditional, always active), it says that no entity was found for all of them. I've only been learning command blocks for the last two days, so I might need some more direction on how to properly set these up.
Also, I may have not specified, but I would like to have total distance traveled, but keeping players total separate (as to see who has traveled the furthest).
The first step is to build a command block chain. If you don't know what that is, it's basically a repeating command block and some chain command blocks attached to it. I've included a screenshot that shows you how to place the command blocks.
After you've done that, you can set all of the chain command blocks to always-active and unconditional. The repeating command block should stay off until all the commands are in place. Now, simply paste the commands in (the order is important) and activate the repeating command block.
To keep track of the total distance, add another chain command block before the last chain command block and paste this command in:
This will add a new line to the scoreboard that says "total <total_distance>".
Here's a world download in case you still can't get it to work: https://www.dropbox.com/sh/chus6bwdd945502/AAA9TtxQ5ko0F96NQuXud9SHa?dl=0
Command block engineer // Developer // #TeamTrees
Well if there is an Way to track the sneaked Blocks as well please let me Know
Here your scoreboard for sneak distance :
I like trains... OF CHAIN COMMAND BLOCKS !
Hello, would there be a way to combine *every* movement type distance together into one m/km output number? Like exactly what you, Megacrafter107, already made up there with the command blocks, but add crouch/fly/boat/horse etc into the total all at the same time? I imagine there's gotta be at least some way to do it.
Thank you for your time.
You would have to modulise each type of distance and then add its output to the total distance travelled
Sweet, how would I go about doing that? I did the world download so I could look at the commands, but had no idea what I was looking at. It didn't look like the commands were directly tied to the walk/sprint scoreboard, but they were? I'm very new to command blocks like these, so I'm sorry in advance. But I appreciate the help non-the less