- check_circle Functions
- check_circle Predicates
Published Nov 29th, 2021, 11/29/21 11:20 am
- 3,813 views, 8 today
- 166 downloads, 0 today
113
WASD Detection
This pack allows you to detect the WASD input keys from the player!
How to use:
Mounted WASD:
(for datapacks where @s is a player)
execute if predicate wasd:is_mounted run function wasd:mounted
execute if score .w wasd matches 1 run say w
(for command blocks or datapacks where @s is not yet the player)
execute as @a if predicate wasd:is_mounted run function wasd:mounted
execute as @a[tag=wasd.w] run say w
Walking WASD:
(for datapacks where @s is a player)
function wasd:walking
execute if score .w wasd matches 1 run say w
(for command blocks or datapacks where @s is not yet the player)
execute as @a run function wasd:walking
execute as @a[tag=wasd.w] run say w
Benefits:
- Detect WASD inputs either via tags or fake player scores (<- this one is more efficient)
- Very low command count and very very efficient / optimized
Drawback:
- Rarely, there is miss input
- First tick of input is usually going to be wrong
(but all subsequent key detections are more accurate than competitors)
For more info watch the video
Installation:
1) Download the .zip
2) Unpack the zip
3) drag the folder into your .minecraft/saves/(world_name)/datapacks folder
This pack allows you to detect the WASD input keys from the player!
How to use:
Mounted WASD:
(for datapacks where @s is a player)
execute if predicate wasd:is_mounted run function wasd:mounted
execute if score .w wasd matches 1 run say w
(for command blocks or datapacks where @s is not yet the player)
execute as @a if predicate wasd:is_mounted run function wasd:mounted
execute as @a[tag=wasd.w] run say w
Walking WASD:
(for datapacks where @s is a player)
function wasd:walking
execute if score .w wasd matches 1 run say w
(for command blocks or datapacks where @s is not yet the player)
execute as @a run function wasd:walking
execute as @a[tag=wasd.w] run say w
Benefits:
- Detect WASD inputs either via tags or fake player scores (<- this one is more efficient)
- Very low command count and very very efficient / optimized
Drawback:
- Rarely, there is miss input
- First tick of input is usually going to be wrong
(but all subsequent key detections are more accurate than competitors)
For more info watch the video
Installation:
1) Download the .zip
2) Unpack the zip
3) drag the folder into your .minecraft/saves/(world_name)/datapacks folder
Compatibility | Minecraft 1.17 |
to | Minecraft 1.18 |
Tags |
tools/tracking
5391199
119
wasd-detection
Create an account or sign in to comment.