Quote:
|
Originally Posted by Inverness
'nick' is a built-in variable so in an npc you can access it with just 'nick' and not 'this.nick' or even 'npc.nick'. I don't use 'this.' with built-in variables, its less confusing for me I suppose. Whatever you're scripting in has a current object in it.
And also, 'id' and 'name' are seperate. 'name' being the object its on and 'id' being the NPC's Id. All weapons have an ID of -1.
|
OR if you decide to use nick as a parameter in a function of the NPC, you can use this.nick = nick or something. Haven't really tried, but otherwise the this.var wouldn't really make sense in having rather than deciphering from unprefixed variables.