I need to improve the Stop Object Down Function script code of a TimeTable, so that the stop of a conveyor is procrastinated until the conveyor gets empty.
At first I thought about a waituntil function I would use in plantsim in such a case, but I could not find a similar function in Flexscript.
So the next idea is to use a while loop, so that the script stays blocked until the conveyor is empty. But I do not know which piece of code to place inside the while, withou causing splash.
Obs: all objects linked to the timetable are conveyors
Or any other way ? Is there any way to make the code wait some seconds before reassessing the condition ? In PlantSim there is the wait(60) to wait 60 seconds, any similar code in Flexscript ?
Thank you !