Hello
I want to run a function(signal to be more accurate) for as long as my KB2D is in the detection_area
I tried to use while loop but it makes the engine to not respond and crush...
here is what I tried
func onChasingDetectionbodyentered(body):
{
if body.isingroup("player"):
x = 1
while x == 1:
movetoplayer(body)
)
func onChasingDetectionbodyexited(body):
{
x = 0
motion.x = 0
}
note: I used brackets only here to make the question a bit more readable
thx