Forum rules - please read before posting, it can save you a lot of time.
ok but about the time?? it´s and if? or some while option??thanks Martinps:can you make a mini exaple?
// this global variable will be set to true if red light is on// you can reference it from other scripts when neededglobal IsRedLightOn;// endless loopwhile(true){ // turn on the red light and turn off the green light Scene.EnableLight("red_light"); Scene.DisableLight("green_light"); IsRedLightOn = true; // add some other red-light related actions, such as playing some animations etc. var Traffic = Scene.GetNode("traffic"); Traffic.SetSprite("path\cars_running.sprite"); // wait for 30 seconds Sleep(30000); // switch the lights Scene.EnableLight("green_light"); Scene.DisableLight("red_light"); IsRedLightOn = false; // again, some green-light related code, for example stopping the traffic animation Traffic.SetSprite("path\cars_standing.sprite"); // wait for another 30 seconds Sleep(30000); // and now the loop will start over, switching back to red light et cetera, et cetera...}