Hi,
I’m just an newbie so take advice with that in mind.
I would think using a global variable to identify the previous storyboard scene could be used somehow.
By putting one line kind of like - previousScene = “scene.lua”
inside the change.scene function or what ever function you use to go forward in the game
function changeScene(e)
if(e.phase == “ended”) then
previousScene = “scene.lua”
storyboard.gotoScene(e.target.scene)
end
end
then on your back function
use that variable somehow.
I’ve never tried it - i tend to use menu buttons - ie push it and it goes back to the menu screen
I started out with a number of scenes but in order to make the code “prep” ready for any problems - figured out how to make some KEY variables global then slam in some if’s - elseif’s to take the code down to a - main/Menu/How2/Game kind of situation, where Game does all the heavy lifting under multiple situations.
T. [import]uid: 199068 topic_id: 35563 reply_id: 141348[/import]