I’m trying to reset my app and I’ve been reading on the Object.removeSelf and object = nil functions but I can’t find clear documentation on where in the code they should be placed.
I’m basically trying to reset the state of my checkBoxes (and in a second app reset the entire game, or at least the score, score = 0 didn’t do it).
I followed the documentation found on the Corona website but it’s not clear where to place the lines. If you place it right after the creation of the checkBoxes they don’t even appear in the game.
I tried to attach the code on my scene change function but I get errors.
I hate having to reopen the app every time just to reset it.
Any help would be appreciated.
local function changeScene4() local options = { effect = "crossFade", time = 800 } radioGroup:removeSelf() radioGroup = nil composer.gotoScene( "scene4", options ) end