The Meaning of Life, the Universe, and Everything.
Join Date:
7/1/2013
Posts:
61
Location:
At My House
Minecraft:
HEAL_Pony
PSN:
HEALPony
Member Details
Its amazing! I cant believe that me and my friend vanjmali accidentally discovered this! We were messing around with cameras and teleportations when I saw vanjmali using the attribute command. I noticed that you can set your speed with pinpoint accuracy, and so I thought of having it at the lowest possible number and still have the player be able to move. Then after some tests with the teleport and movement testfor that I already made, it works with the lowest speed possible and very barely moves the player at all! You can barely notice the teleportation movement at all! I feel like this will help a lot with map makers that are making 2d platformer maps and much more! Also, no need for credit, but if you want, you can and it would be much appreciated too! Thank you for reading this, and here's the commands!
(also, I need to do more testing, but this was mainly copy pasted from an entity, so make sure to summon an entity where the player should be and make it a marker. Also dont forget the tag "tv" or whatever tag you want, just dont forget to change it in the command if its not tagged as tv.)
-
-Apply attributes
execute as @a[gamemode=adventure] at @s run attribute @s minecraft:generic.movement_speed base set 0.0004
-Testfor player movements
-North
execute as @e[tag=tv] at @s positioned ^ ^ ^-0.1876 if entity @a[gamemode=adventure,distance=0..0.18759] run say W
-East
execute as @e[tag=tv] at @s positioned ^0.1876 ^ ^ if entity @a[gamemode=adventure,distance=0..0.18759] run say D
-South
execute as @e[tag=tv] at @s positioned ^ ^ ^0.1876 if entity @a[gamemode=adventure,distance=0..0.18759] run say S
-West
execute as @e[tag=tv] at @s positioned ^-0.1876 ^ ^ if entity @a[gamemode=adventure,distance=0..0.18759] run say A
-Force TP
execute as @e[tag=tv] at @s run tp @p[gamemode=adventure] ^ ^ ^ 180 0
-Reset Speed If Not In Adventure
execute as @a[gamemode=!adventure] at @s run attribute @s minecraft:generic.movement_speed base set 0.1
Its amazing! I cant believe that me and my friend vanjmali accidentally discovered this! We were messing around with cameras and teleportations when I saw vanjmali using the attribute command. I noticed that you can set your speed with pinpoint accuracy, and so I thought of having it at the lowest possible number and still have the player be able to move. Then after some tests with the teleport and movement testfor that I already made, it works with the lowest speed possible and very barely moves the player at all! You can barely notice the teleportation movement at all! I feel like this will help a lot with map makers that are making 2d platformer maps and much more! Also, no need for credit, but if you want, you can and it would be much appreciated too! Thank you for reading this, and here's the commands!
(also, I need to do more testing, but this was mainly copy pasted from an entity, so make sure to summon an entity where the player should be and make it a marker. Also dont forget the tag "tv" or whatever tag you want, just dont forget to change it in the command if its not tagged as tv.)
-
-Apply attributes
execute as @a[gamemode=adventure] at @s run attribute @s minecraft:generic.movement_speed base set 0.0004
-Testfor player movements
-North
execute as @e[tag=tv] at @s positioned ^ ^ ^-0.1876 if entity @a[gamemode=adventure,distance=0..0.18759] run say W
-East
execute as @e[tag=tv] at @s positioned ^0.1876 ^ ^ if entity @a[gamemode=adventure,distance=0..0.18759] run say D
-South
execute as @e[tag=tv] at @s positioned ^ ^ ^0.1876 if entity @a[gamemode=adventure,distance=0..0.18759] run say S
-West
execute as @e[tag=tv] at @s positioned ^-0.1876 ^ ^ if entity @a[gamemode=adventure,distance=0..0.18759] run say A
-Force TP
execute as @e[tag=tv] at @s run tp @p[gamemode=adventure] ^ ^ ^ 180 0
-Reset Speed If Not In Adventure
execute as @a[gamemode=!adventure] at @s run attribute @s minecraft:generic.movement_speed base set 0.1
-Loop
schedule function (this function) 1t
Heres a video on how it works too!