It sounds like what you need help on is NWN local variables. But your question is vague enough that it is hard to tell what you need help with. hopefully this will help.
I myself, think that the naming the varialbes, set on an object by the SetLocal* functions, can become confusing to a novice to NWN. The reason is that in a normal programming any varaiable you use in a script is concidered a Local Varaiable. In NWN however when we talk about local variables, we are talking about a script accessable variable that has been placed on an object in the game via the SetLocal* functions.
Basicly any variable that you use in a script: ie.
int nVar1 = 100;
will be created when the script is ran and wil be gone once the script is finished running.
Variables that you set on an object via the SetLocal* functions: ie.
SetLocalInt( GetModule(),"nVar1", 100);
Will get created on that object, the first time the function is called. They will also not be destroyed untill the object, they are on, is destroyed or the DeleteLocal* function is called.
This allow you to create variables that can be accessed by more then one script.
I hope that helps.
EDIT: Edited for readabilty. I could not even understand what I wrote.
Modifié par Lightfoot8, 16 décembre 2011 - 10:22 .