What do the function?
self/level endon("");
self/level notify("");
self/level waittill("");
ps:ty
Printable View
What do the function?
self/level endon("");
self/level notify("");
self/level waittill("");
ps:ty
Notify means it gives a warning that something happened.
Endon means that it will stop the function if that thing happened
Waittill means that the function wait till that thing happened.
Correct me if im wrong
You are only wrong in that there isn't a warning, as such. That is the wrong word to use. But other than that, you are correct: notify(), waittill(), and endon() are all linked together: a waittill() is a wait function. But instead of a stated time, it waits indefinitely for a notification. Hence:
Code:self waittill( "time_to_end" );
Go together - a thread will not proceed past the waittill( "time_to_end" ). It sits there waiting for the notification - notify( "time_to_end" ). If it doesn't get the notification, it will wait indefinitely.Code:self notify( "time_to_end" );
As to endon(), you will see things like endon( "disconnect" ) at the top of a loop function, which only ends when the player leaves. And if you look at the callback_playerDisconnect() function, you will see:
This signals all the threads which are waiting for the player to disconnect to end. So, the purpose of endon() is to Kill the thread or function.Code:self notify( "disconnect" );