hi, i have a problem here. Because the problem now is the yield WaitForSeconds is still counting.. How do I stop the function from executing halfway? And reset the function whenever I call it out again. Code (csharp): function Update() { Move(); } function Move() { if(!cooldown) { cooldown = true; MoveLeft(); yield WaitForSeconds(1); MoveRight(); yield WaitForSeconds(1); MoveTop(); yield WaitForSeconds(1); MoveBottom(); cooldown = false; } }
Hi, not sure if I understand correctly, but you are calling your Move() Function in your Update loop, so it gets executed again and again every 3 seconds. Maybe you can bind the Move() Function to a key or to any other condition / event. -- oxl