question, so i have a game with 15 levels and i was able to reload my scene by creating an intermediate scene meaning,
i have level 1 and whenever i want my scene to start from the beginning or my player wants to restart the level i have created a reload level 01, in this one i completely remove level 01 first and then re send it to level one which makes my level 01 start from the beginning,
so the problem is i have 15 levels does that mean i have to create 15 extra reload scenes so i can do this for every single level, is it possible to create one scene so that it can handle all 15 levels?
this is what my reload scene looks like
local storyboard = require( “storyboard” )
local scene = storyboard.newScene()
function scene:createScene( event )
local group = self.view
storyboard.removeScene(“level01”)--------------remove level scene
end
function scene:enterScene( event )
local group = self.view
local changeScene = function()
storyboard.gotoScene(“level01”)-------------resend to the level scene
end
myTimer=timer.performWithDelay(500,changeScene,1)
end
if possible
how can i make this remove any level and then resend it to that level so i dont have 15 extra pages