Frictional Games Forum (read-only)
Can the game memorize variables, forever? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Can the game memorize variables, forever? (/thread-24376.html)



Can the game memorize variables, forever? - Neelke - 01-15-2014

I was having quite a good idea with the probably the last mod I will make, but I'm not sure if this is possible. For that to work, I need to make sure that the globals you get is something the game will memorize forever.

For example. You pick up a note and there you get a global variable. Now the game will remember that even when you shut off the game, but removeable once the player desire so. Is this possible?


RE: Can the game memorize variables, forever? - Romulator - 01-15-2014

If I am not mistaken, global variables are once assigned accessible at ANY time after it is declared, because it is saved. You could always script a small map with like, two notes or something to test your theory. Something like:

Code:
Player picks up note_01.
note_01 is being read    -> global_var_01 = 123

if global_var_01 = 123 then
   note_02 has text
else
   note_02 has no text
end if

In this pseudocode, you can create this, then for your testing purposes, just save and exit between reading the notes Big Grin