View Single Post
  #4  
Old 08-06-2011, 03:21 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
In your case, you should probably use TStaticVars; like this:

PHP Code:
this.var = new TStaticVar("MyVar");
this.var.var1 1;
this.var.var2 2;
this.var.join("my_class"); 
You can then use the following code (even in other NPCs) to create a new "instance" of it:
PHP Code:
temp.var = new MyVar() 
Or, at least I think that's how those work. Didn't use them for quite a while, and only ever tried them on the clientside. var1 and var2 are just examples, and the last line is supposed to show you that you can also join classes to TStaticVars (which I've actually done in the past - works well!).
Reply With Quote