NWN has a thing called a Local Variable. Now Given they gave it a bad name, When most people think of a local variable they think about variabls that are placed on the stack. Not the case here, Local Variables are in fact the closest thing you are going to get to global variables. I almost with they would have called them ObjectVariables instead. For that is what they are they are variables that are local to an Object, Not local to a script or function that the name would imply.
So setting a Local Variable on the module will give you a Var that will last as long as the module does. You can concider that global.
As far as how to set/get them in scripting.
Get/SetLocalFloatGet the value of a decimal number stored on an object.
Get/SetLocalIntGet the value of a whole number stored on an object.
Get/SetLocalLocationGet the data describing a location stored on an object.
Get/SetLocalObjectGet the data describing an object stored on an object.
Get/SetLocalString
Modifié par Lightfoot8, 30 avril 2012 - 10:03 .