Add RESTART and PAUSE commands
JujuAdams opened this issue · 1 comments
JujuAdams commented
At the moment calling .Restart()
, .Pause()
, or .Cancel()
from within the target coroutine causes unexpected behaviour. Due to the way the coroutine VM works, coroutine execution state is only considered at the end of a code block (at a macro). This means exhibited behaviour is
CO_BEGIN
show_debug_message("This appears");
Restart();
show_debug_message("And this does too");
CO_END
In order to work around this problem, two things need to be done:
- Prevent
.Restart()
,.Pause()
, or.Cancel()
being called from within the target coroutine (and should instead throw an error) - Implement
RESTART
andPAUSE
commands to create a breakpoint within the coroutine
JujuAdams commented
Implemented for v1.2