Game Development Community

iTGB - Load last scene (level)

by Sergey Brezhnev · in Torque Game Builder · 03/01/2010 (4:35 pm) · 1 replies

Hi, I'm not a programmer, but I need help. I can only use behaviors and copy-paste code..
There is a Main Menu and a sequence of scenes in my project. How can I make iTGB save last scene name that was played and then load it from Main Menu if the game is restarted.
I have a button "Continue" in Main Menu with levelbutton.cs behavior, and I want it to load last scene played before
I thought maybe each scene will save update a specific file with just a name of level, and then "Continue" button will read this name somehow and load it?
will it work on iphone?
Thanks a lot!!

#1
03/01/2010 (11:41 pm)
I don't know the iPhone at all, but can't you just write a file with the name of the last level played, writing it the moment the level starts? When the main menu starts up, if the file is empty, disable the Continue button.