Eventu: Safe Signals?

Description: Official subforum for LunaLua - an extension framework for SMBX Engine Version 1.3 (which a core of SMBX 2.0). Share your creations that require the use of LunaLUA. You may also share info/tutorials on how to use LunaLUA.
Moderator: Moderators

Sambo M
Topic author, Count
Count
Avatar
Sambo M
Topic author, Count
Count
Age: 19
Reputation: 13
Posts: 264
Joined: 27 Jun 2014

Post #1by Sambo » 26 Mar 2016, 3:21

If I send a signal before a coroutine is waiting for it, it throws an error. I think there should be a built-in safety for this function. It could simply be this condition:

Code: Select all

**NOT ACTUAL CODE**
If a coroutine is awaiting this signal then
   send the signal
end
(I see somebody made it so TAB can be used in a code box. Nice :) )

Also, there doesn't seem to be a function for testing if a coroutine is currently running. This may be useful for preventing multiple instances of a coroutine from running at the same time.
Image
Current Project:
Image

Return to “LunaLua - Extension Framework”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest