Yield WaitForTrue?

Greetings,

I’ll make it short, is there a yield function that can make the function wait until a certain boolean is at true?

I have other solutions, but it’d be muuuch more cleaner if there would be such a thing.

PS: From the script reference, there isn’t so I’m double checking.

Just use yield, and check for the boolean.

function Wait () {
	while (!someBoolean) {
		yield;
	}
}