Greetings. Programing is going well for my game, but I had a thought. Currently I plan to use an ini to save the 60 values I need. Before you'd exit a level, the ini would be save the current values. When you go to the next frame it would be set to load them. It's kinda a pain in the ass but it works. Does anyone know of a easier way? Thanks.
I don't know if "at end of frame> save values to ini" would work given the long task it had to do.
Instead of just jumping to the next frame initiate a little sequence-
Player collides with door; start "Save" fastloop for 60 loops.
On "save" loop= set value item> LoopIndex(save) > Global Value( LoopIndex("save") )
LoopIndex(save)=60; next frame.
Then;
Only run event once; start "load" fastloop for 60 loops.
On "load" loop= set global value LoopIndex("load") to ItemValue( "Ini", LoopIndex("load"))
Edit: sorry, didn't see you weren't using Global values. So disregard all that. Just use global values though if you're using MMF2. Save values to them and they'll transfer over frames.
I'm uh, using tgf... lol But you gave me an idea. I could create a timer when the player should be going to the next frame that will delay leaving the frame by a second or two. That will give the ini enough time to record all the values.
i swear. i'm this close to redesigning the whole game to work with just tgf's 16 built in globals... although i'd have to scrap a lot of the cool ideas i had.
That would be unfortunate. If nothing else, upgrade to MMF2. That's what I plan on doing when I get enough money. I'm sure there's a way in good ol' TGF1 though... >_O HMMMMMMM
in tgf is 000 different from 0? also what is the highest number value you can have in a tgf counter? i have a good idea
edit: I realized a way to store many values within on normal global value. I know it sounds crazy, but I can make my game only using the 16 global values. Gameplay would only be changed a little.
Now here is a new question; how do I set up an ini so I have more then one save slot?
. Both methods should work as typed if the slot you're using is in a counter called Save Slot and you use it before saving, but decrypt your INIs before and encrypt after saving to avoid tampering. There was a link posted here for an encryption object somewhere, I'll see if I can find it.
And if you're still curious, yes, Alt. Values of global objects are carried across frames.