#[Question] WASD Detection
1 messages · Page 1 of 1 (latest)
execute at @e[type=armor_stand,name=main] positioned ^^^1 as @e[r=0.9] run say w
I think it’s gonna work
I tried execute at @e[type=armor_stand,name=main] positioned ^^^1 as @e[r=0.9] run say "w" but it didn't seem to work
execute as @e[type=armor_stand,name=main] at @s rotated as @s positioned ^^^1 run execute as @e[r=0.9] run say w
Try this
Maybe It’s doesn’t get stand’s rotation without as
Maybe there’s a problem in min_engine_version , cuz execute at @e[type=armor_stand,name=main] positioned ^^^1 as @e[r=0.9] run say w works at my world
I am using min engine 1, 19, 60 in my manifest (s).
Is 1.19.60 is your current version?
I am on 1.20.30
Try to set 1.20.30 in min_engine_version
Didn't seem to help. That's odd it works for you. I wonder what I am missing >.< could you package up your world and script as a zip or something?
Maybe later sorry
np, i appreciate the help. i am going to put this up on GitHub in the meantime.
Hilarious... i was watching a youtube video (unrelated) and a slime came up and it fired the say command >.<
@charred current This is the post I was trying to help figure out..
The command execute @e[name=main,type=armor_stand] ^^^1 execute @e[r=0.9] say w needs the new execute translation... and everything I tried is not working... the vid he references to do it is in the 1st post.. should be easy.. but not.
I changed it to be from player's reference instead and am close, maybe, but not able to isolate the side
The issue is likely because the position is tested after armor stand was already teleported. So it will always be equal to player position when you're trying to detect movement direction from change in position.
The old execute worked for w a s d detection in a round-about way.
It kinda looks like it is following/mimicking you, if you are moving... once you stand still it is in your space
This is just clienside interpolation, server position always exactly matches player position
Move this line and one of the proposed solutions should work
How did it work before new execute... there was a 2 tick delay within the whole system.. and I believe he tp'd it ^^^10 away
Oh, that may not match the video...
nvm it does
Command block delay is why it was working in the video but in a function file there is no delay
I am testing in a command block system... cannot get the testing of position to work... all sides match
This is my latest try execute as @a at @s positioned ^^^1 run execute as @e[name=wsad,r=0.5] run say w
This did not work execute at @e[name=wsad,type=armor_stand] at @s positioned ^ ^ ^1 run execute as @a[r=0.9] say w
I tried playing with r= and adding rm=.. no dice... seems like no translation to make it work the same
execute as @e[name=main,type=armor_stand] at @s positioned ^^^1 as @e[r=0.9] run say w try this
no w showed up
Try smaller r
even smaller
r=2 we both say w
Seems like that should be the matter of configuring r correctly then
adding same code to s to see if both do it at same time... which was issue I was getting
r=1.5 I get both W and S r=0.99 none
Do you teleport before testing w command?
what are the command block delays and timings
@real thorn
hi
Solution... via command blocks only... will have to do something different for function files (timer delay).. cause you need those 2 tick delays...
execute as @e[name=main,type=armor_stand] at @s positioned ^^^1 as @e[r=0.99] run say w
Thanks Veka...
..oops see above...
It should work in functions if you tp after testing position btw
Thanks so much for the advice. I will test it soon.
That was it! I just moved the tp down like @charred current said.
execute at @e[type=armor_stand,name=main] positioned ^^^1 as @e[r=0.9] run say "w"
execute at @e[type=armor_stand,name=main] positioned ^1^^ as @e[r=0.9] run say "a"
execute at @e[type=armor_stand,name=main] positioned ^^^1 as @e[r=0.9] run say "s"
execute at @e[type=armor_stand,name=main] positioned ^-1^^ as @e[r=0.9] run say "d"
execute at @a[tag=init] run tp @e[name=main,c=1] ~ ~ ~ facing ^ ^ ^10```