storyboard.gotoscene params not passed within a timer

I’m trying to use a timer to wait 2 seconds before changing scenes. However for some reason the “params” field isn’t making it to the next scene’s willEnterScene method. It works as expected w/o the timer.

– Works great! The event.params field (aka stageCompleteOptions.params)
– is not nil and available in stagecomplete.lua’s willEnterScene method

storyboard.gotoScene( "stagecomplete", stageCompleteOptions )

– Throws an error inside stagecomplete.lua’s willEnterScene method
– when it tries to access event.params (which is nil)

timer.performWithDelay( 2000, function() storyboard.gotoScene( "stagecomplete", stageCompleteOptions ) end)

Any thoughts? Thanks!

How are you populating the stageCompleteOptions object? Is the object being cleared out of memory by something which might happen between setting the timer and the timer firing? What is the actual content of the params when the stagecomplete scene executes?

Strange, I can’t seem to reproduce this anymore. Will re-open with more details if it resurfaces. Thanks!

How are you populating the stageCompleteOptions object? Is the object being cleared out of memory by something which might happen between setting the timer and the timer firing? What is the actual content of the params when the stagecomplete scene executes?

Strange, I can’t seem to reproduce this anymore. Will re-open with more details if it resurfaces. Thanks!