Well, you’re calling it from update which means you have 1 per frame of your function running. If you have 60fps that means you have 60 intermitente running per second, so they will all trigger like crazy after each other.
I think your for loop is missing brackets. Fix that and move the call back to start. should fix it.
function intermitente () {
yield WaitForSeconds (0.3);
for(var i : int = 0; i > 35; i++)
{
arrow_01.SetActive (true);
yield WaitForSeconds (1.1);
arrow_01.SetActive (false);
yield WaitForSeconds (1.2);
}
}
Also just a friendly note, UnityScript is going out the door, consider switching to c#. It will be easier to help you as well for the future.
This loop will never execute. The code says “start i at 0. while i > 35 execute the loop, then increment i.” Since i starts out at 0 it is never greater than 35, so the loop exits immediately. What you most likely want is:
Ah, yep. that also. Didn’t look that close at the loop itself. So yes, that as well @iTextures . The reason your code runs right now is because you are missing the brackets, adding the brackets would have made the loop not run, but @Dave-Carlile has the other fix you need for that.
thanks you … thanks you a lot
I am … but this script i really need it … but i am change to c# since 2 month … tryi9ng to make my new game all with c# … vido here
.