O
orcnaydn
Guest
Hey guys i want to duplicate room then save it but when close game room deleting can help me ?
Attachments
-
26 KB Views: 16
I'm sorry I saw the answer late. What do I need to save in the .ini file? And when i assign room, not assigned just a black screen.Is it necessary to duplicate the room? As far as I can see you could easily assign the room id to your variable.
However, what you're doing is saving a reference to the room id of the given room within a variable. It is normal that when the game is closed, the value of that variable is lost.
You could create a simple .ini save file, and write the value of the variable you want to keep inside the file. After starting the game you can restore the value of the variable by reading it directly from the file.
Manual: Ini Files
PS:
Do not post code photos. Next time use the appropriate rags. You will make your posts more readable.
DON'T get the index of the room. Get the NAME of the room and save that as a string, then when loading use the function "asset_get_index()" on the loaded name to get the room index value. You should NEVER rely on raw index values as references to any asset in the resource tree as these can change at any time. Using them in this way is undocumented behaviour and will bite you in the *ss one day.If yes, just save the index of the room (room)