Aller au contenu

Photo

The longevity of variables


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
AmbrosiaPW

AmbrosiaPW
  • Members
  • 35 messages
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 .


#2
Ryuhi2000

Ryuhi2000
  • Members
  • 97 messages
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

#3
AmbrosiaPW

AmbrosiaPW
  • Members
  • 35 messages
Ok Thank you very much!