How to test player movement speed in 1.8?
I am wondering if there is a better way to track, or test, how fast a player is going, then activate command off that. So far I have: /scoreboard objective add Sprint stat.WalkOneCm
Then, every tick I have that set to zero. /scoreboard players set @p Sprint 0
Then, after it resets 5 times, It tests to see if the players movement speed if in between 150 and 200 WalkOneCm score per tick. If true, then you get a speed boost. However, sometimes it fails, and tests when its at 50 or so. Is there a better measurement?
Best Answer
I found a possible answer, but I haven't got it to work yet:
First, you build a clock (with a bit longer delay).
Then, you let a set of Command blocks be triggered at once. Theese CMD blocks should summon a circle of Armour Stands with different names around the Player.
Then, after a small delay, a CMD Block row tests the Player distance from each ArmorStand (by name). If any Player-ArmorStand distance is smaller then, let's say, 1 block, another command is executed, eg.:
/execute @e[name=ArmorStand1] ~ ~ ~ execute @a[r=1] say @p is sprinting
If summoned in this way, it gives a total of 24 CMD blocks:
_ ? ? ? _
? _ _ _ ?
? _ P _ ?
? _ _ _ ?
_ ? ? ? _
P for Player, ? for ArmorStand, _ for nothing.
Pictures about "How to test player movement speed in 1.8?"
How do you show your speed in Minecraft?
To use the speed that you have used, you need to run.How do you give players speed in Minecraft?
The Speed effect is a status effect that increases your speed causing you to move faster in the game....Background.Status EffectSpeedGame Command/effect command5 more rowsHow I Mastered Minecraft 1.8 PVP in 1 Week
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Pixabay, Burak The Weekender, Pixabay, Mateusz Dach