Thread: #n > Gs2
View Single Post
  #6  
Old 02-11-2006, 08:43 PM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
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.
Reply With Quote