Thread: Weapon
View Single Post
  #5  
Old 05-09-2011, 09:52 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by mrnothersan View Post
Right... so my NPC script currently looks like this:
PHP Code:
function onActionPlayerOnline() { 
  
player.addWeapon("testgui","Tailor"); 

(from a previous script and i just add
PHP Code:
,"Tailor" 
... will it still work if i remove
PHP Code:
player
?


EDIT: I removed player. and applied... entered game and it 1.Removed all my tools. 2.Didn't give me testgui or Tailor....
It seems like you have some critical misunderstandings of GS2. Adding more parameters to a function, like you just did with addWeapon, does not call it twice.

Look at what Fowlplay posted if you want to add multiple items. He uses the proper structure to do this (an array).
Reply With Quote