#Cancel on Movement [SOLVED BY ME]

1 messages ยท Page 1 of 1 (latest)

twilit hinge
#

thats easy

fringe adder
#

check distance between the location they ran the command at and their current location

twilit hinge
#

on move:
if {varible} is set
cancel event

placid flame
#

oh

#

thatsit?

#

thats it? *

twilit hinge
#

ye

#

but use an acuall varbile

#

๐Ÿ™‚

placid flame
placid flame
fringe adder
placid flame
fringe adder
#

a significantly laggier solution

twilit hinge
#

unless u have insane server like me ๐Ÿค‘

fringe adder
#

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

placid flame
#

if i just want to make if the characters moves or the cords changes to cancel the teleport

fringe adder
#

the move event is called every time someone walks, turns, whatever

#

you only need to check their position in the teleport loop

fringe adder
#

so you're agreeing with me in that using distance is better than a separate event

placid flame
fringe adder
#

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

placid flame
#

intresting

#

is there any way you can show me an example on how to add your idea in the loop? ๐Ÿ˜ญ

lunar cypress
fringe adder
#

loop:
if distance too large:
stop
wait
teleport

placid flame
#

are you sure?

fringe adder
#

yes

placid flame
#

this thing it wont lag?

fringe adder
#

unless you're waiting like 1 tick

#

you only need to wait 1s, which is 5 checks

placid flame
#

i add it in the loop?

placid flame
placid flame
#

i fixed it!!!!!

fringe adder
#

๐Ÿ‘