Quote:
Originally Posted by Gunderak
is there any way to change another npcs variable by some command like findnpc("whatever").this.mode = ?
if i made it join to a class how would i change the class variables via a script?
|
The
this prefix refers to the current object. If you did it as you proposed (which wouldn't work since you can't use findNPC for local NPCs (level NPCs)), you'd be setting
this.this.mode. In the example I gave above,
PHP Code:
temp.npc.variableName = value;
As I said,
temp.npc is the actual NPC object.
What do you mean by class variables? That doesn't make any sense, classes are joined to an object. They don't have separate sets of variables.