Author Topic: The longevity of variables  (Read 310 times)

Legacy_AmbrosiaPW

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +0/-0
The longevity of variables
« on: April 24, 2011, 10:08:21 pm »


               Hi, I'm pretty new to scripting for NWN. I'm writing a questing system. I set a variable on the NPC that gives the quest when they have actually given the quest. As long as this variable is set, the NPC will think the PC is on a quest.


SetLocalInt(oSelf,ObjectToString(oPC),4); 
Value of 4 is ID of receiving NPC.

So I'm wondering what happens to this variable when i reboot the server? It appears to get deleted.

Do local variables get lost when you reboot the server?
If so, how do I save this data so it doesn't get lost if the server reboots?
Should I write it to a campaign variable instead?
Thank you!':wizard:'
               
               

               


                     Modifié par AmbrosiaPW, 24 avril 2011 - 09:34 .
                     
                  


            

Legacy_Ryuhi2000

  • Full Member
  • ***
  • Posts: 159
  • Karma: +0/-0
The longevity of variables
« Reply #1 on: April 25, 2011, 12:45:00 am »


               if its set on the quest giver int he toolset itself it wont get lost
but if its set in game it will get lost unless its a campaign variable
               
               

               
            

Legacy_AmbrosiaPW

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +0/-0
The longevity of variables
« Reply #2 on: April 25, 2011, 01:37:47 am »


               Ok Thank you very much!