OpenSesame Inline Code canvas not ending in coroutine
I'm new to OpenSesame, and I'm trying to hide an array generated by an inline code item in a coroutine (shown in the first picture). I'm trying to get 'test_array2' (Run code shown in the second picture) to be displayed for only 500 ms, with it being replaced by a blank screen (the empty sketchpad 'mask') for 1000 ms. Any advice as to how to achieve this would be appreciated!
Comments
Hi Chris,
If you insert an
inline_scriptinto acoroutinesitem, the run phase of that script is executed on every cycle of the coroutines, so over-and-over-and-over again. To avoid this, you could for example set a marker variable in the prepare phase:And then use this to avoid showing
c2multiple times in the run phase:if not c2_shown: c2.show() c2_shown = TrueDoes that make sense? There are many other solutions as well, but this seems easy.
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
That does make sense, many thanks for your explanation and the help! I've implemented the code and it works perfectly!
Thanks again,
Chris