jssjr90 
 
 
		
			Member 
			
			
			
 
			
	Posts: 169 
	Threads: 39 
	Joined: Jun 2011
	
 Reputation: 
0
		
	 | 
	
		
			
  
Custom item and Give Item script help 
			 
			
				Ok so I have a custom item that I have modified, I turned one of the entities from the game, "Note_generic1" into a puzzle item though the model editor, saved it to its own folder with its required recourse's. I also have its own item picture. But I come across 2 problems. 
 
One of my problems is that when I put the new item in the game, it does not have its glow around the object, it acts like a static object. How can I make it to where when I want to pick up it gives me that custom item in my inventory? 
 
Also how to I use Give Item script properly? I have tried giving the player the custom item from the start. This is part of the script: 
// 
GiveItem("note_generic", "note_generic", "Funeral Bill", note_generic.png, 1); 
 
But it comes up with errors saying this: 
note_generic is not declared. 
 
It also states in the function that the object does not half to be in the world. 
 
Can anybody help me out on this? This is the one thing im truly stumped on, im also the one working on that custom story "The Hands That Resist Him" So if anybody can help me out on these 2 problems I would be grateful.  
 
 
			 
			
			
			
		 |  
	 
 | 
 
	| 12-29-2011, 09:19 PM  | 
	
		
	 | 
 
 
	
		
		Obliviator27 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 792 
	Threads: 10 
	Joined: Jul 2011
	
 Reputation: 
66
		
	 | 
	
		
			
RE: Custom item and Give Item script help 
			 
			
				 (12-29-2011, 09:19 PM)jssjr90 Wrote:  Ok so I have a custom item that I have modified, I turned one of the entities from the game, "Note_generic1" into a puzzle item though the model editor, saved it to its own folder with its required recourse's. I also have its own item picture. But I come across 2 problems.  
 
One of my problems is that when I put the new item in the game, it does not have its glow around the object, it acts like a static object. How can I make it to where when I want to pick up it gives me that custom item in my inventory?  
 
Also how to I use Give Item script properly? I have tried giving the player the custom item from the start. This is part of the script:  
//  
GiveItem("note_generic", "note_generic", "Funeral Bill", note_generic.png, 1);  
 
But it comes up with errors saying this:  
note_generic is not declared.  
 
It also states in the function that the object does not half to be in the world.  
 
Can anybody help me out on this? This is the one thing im truly stumped on, im also the one working on that custom story "The Hands That Resist Him" So if anybody can help me out on these 2 problems I would be grateful.  
As far as your first issue goes, you need to have the .ent file altered in the ModelEditor in order to make it an item (Found under User Defined Variables) Not sure if you've done this already, but it doesn't hurt to suggest such a thing.
 
Second issue is simply putting quotation marks around note_generic.png. It'll then look for a phrase instead of a variable in the script.
			  
			
			
 
			
		 |  
	 
 | 
 
	| 12-29-2011, 09:26 PM  | 
	
		
	 | 
 
 
	
		
		jssjr90 
 
 
		
			Member 
			
			
			
 
			
	Posts: 169 
	Threads: 39 
	Joined: Jun 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Custom item and Give Item script help 
			 
			
				Well I did alter it to a puzzle item like I said in the post, I can now take the note, but it picks it up like it is a note, and does not appear in my inventory. 
 
Also on the 2nd thing of give item, I did do that, did not have any fatal errors, but it still will not appear in my inventory! Why must this be so frustrating! I give up! Jk, but still this is just uhhhh.
			 
			
			
			
		 |  
	 
 | 
 
	| 12-29-2011, 09:36 PM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: Custom item and Give Item script help 
			 
			
				 (12-29-2011, 09:36 PM)jssjr90 Wrote:  Well I did alter it to a puzzle item like I said in the post, I can now take the note, but it picks it up like it is a note, and does not appear in my inventory. 
 
Also on the 2nd thing of give item, I did do that, did not have any fatal errors, but it still will not appear in my inventory! Why must this be so frustrating! I give up! Jk, but still this is just uhhhh. 
Altering it is one thing; giving the file a name that differs from the original so that the game doesn't revert to the original .ent file is another thing.
			  
			
			
 
			
				
(This post was last modified: 12-29-2011, 10:24 PM by Your Computer.)
 
				
			 
		 |  
	 
 | 
 
	| 12-29-2011, 10:23 PM  | 
	
		
	 | 
 
 
	 
 |