#Cancel on Movement [SOLVED BY ME]
1 messages ยท Page 1 of 1 (latest)
check distance between the location they ran the command at and their current location
how ๐ญ
on move:
if {varible} is set
cancel event
do i have to put it in the loop?
wait for example what variable?
distance between <location A> and <location B>
isnt this also an solution?
on move:
if {varible} is set
cancel event
a significantly laggier solution
unless u have insane server like me ๐ค
and also doesn't stop them from teleporting, but that's just because you're not clearing the variable / checking if its unset when teleporting
Yes but also why we need location a + b?
if i just want to make if the characters moves or the cords changes to cancel the teleport
the move event is called every time someone walks, turns, whatever
you only need to check their position in the teleport loop
Exactly!
so you're agreeing with me in that using distance is better than a separate event
Yes but still i dont understand if we are only checking the position of the player, why we need location A and location B?
to check if someone moved since they started the command, you'd need a copy of the starting location to compare to
distance between is a way to make the movement check more lenient and not care whether or not your yaw/pitch is different
hmmm
intresting
is there any way you can show me an example on how to add your idea in the loop? ๐ญ
set a local variable to their location when they run the command
loop:
if distance too large:
stop
wait
teleport
yes
this thing it wont lag?
OHHH
i add it in the loop?
is it ok?
YOOOOOOO BRO
i fixed it!!!!!
๐