Eventer - Make events without external instances

Ahhhhhh I see! So task library is a fairly recent feature that lets you halt threads that aren’t necessarily coroutines, plus more, righto-mundo?? :sunglasses:

yeah, just use coroutine.running to get the current thread, coroutine.yield(running) to pause the thread, and use the connect function to task.spawn(running) to create a wait function

1 Like

A great ide is to add Event:Wait(timeout: number). Should be very easy, just have a variable which is os.time() + timeout and then in the repeat, just wait until either the event fires or timeout reaches.

1 Like