#[Question] WASD Detection

1 messages · Page 1 of 1 (latest)

full nexus
valid belfry
#

I think it’s gonna work

full nexus
#

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

valid belfry
#

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

full nexus
#

Dang, no dice.

valid belfry
#

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

full nexus
#

I am using min engine 1, 19, 60 in my manifest (s).

valid belfry
#

Is 1.19.60 is your current version?

full nexus
#

I am on 1.20.30

valid belfry
#

Try to set 1.20.30 in min_engine_version

full nexus
#

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?

valid belfry
#

Maybe later sorry

full nexus
#

np, i appreciate the help. i am going to put this up on GitHub in the meantime.

full nexus
#

Hilarious... i was watching a youtube video (unrelated) and a slime came up and it fired the say command >.<

strange hemlock
#

@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

charred current
#

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.

strange hemlock
#

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

charred current
#

This is just clienside interpolation, server position always exactly matches player position

#

Move this line and one of the proposed solutions should work

strange hemlock
#

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

charred current
#

Command block delay is why it was working in the video but in a function file there is no delay

strange hemlock
#

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

charred current
#

execute as @e[name=main,type=armor_stand] at @s positioned ^^^1 as @e[r=0.9] run say w try this

strange hemlock
#

no w showed up

charred current
#

Try smaller r

strange hemlock
#

r=0.5 nope

#

wish I could screen share in here

charred current
#

even smaller

strange hemlock
#

r=2 we both say w

charred current
#

Seems like that should be the matter of configuring r correctly then

strange hemlock
#

adding same code to s to see if both do it at same time... which was issue I was getting

charred current
#

try 0.99

#

It should be somewhere between 0.9 and 1

strange hemlock
#

r=1.5 I get both W and S r=0.99 none

charred current
#

Do you teleport before testing w command?

#

what are the command block delays and timings

strange hemlock
#

r=1 both... lemme get the commands... wanna go to chat screen share?

#

in staff

charred current
#

Try delay 2 for first block and 0.99 as r

#

@strange hemlock

strange hemlock
#

@real thorn

real thorn
#

hi

strange hemlock
#

Thanks Veka...

charred current
full nexus
#

Thanks so much for the advice. I will test it soon.

full nexus
full nexus
#
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```