ehovda321 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 38 
	Threads: 22 
	Joined: Dec 2011
	
 Reputation: 
0
		
	 | 
	
		
			
How to remove Item (Entity)? 
			 
			
				Is it possible to do a function... something like this? 
 
RemoveItem("potion_health.ent"); 
 
Can you do something similar to that?
			 
			
			
			
				
(This post was last modified: 03-14-2013, 05:45 PM by ehovda321.)
 
				
			 
		 |  
	 
 | 
 
	| 03-14-2013, 05:42 PM  | 
	
		
	 | 
 
 
	
		
		tonitoni1998 
 
 
		
			Member 
			
			
			
 
			
	Posts: 163 
	Threads: 54 
	Joined: Oct 2012
	
 Reputation: 
1
		
	 | 
	
		
			
RE: How to remove Item (Entity)? 
			 
			
				You mean from the inventory?
			 
			
			
 
When you are looking for someone, to do the scripting for your Custom Story, ask me! 
			
		 |  
	 
 | 
 
	| 03-14-2013, 05:48 PM  | 
	
		
	 | 
 
 
	
		
		ehovda321 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 38 
	Threads: 22 
	Joined: Dec 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: How to remove Item (Entity)? 
			 
			
				 (03-14-2013, 05:48 PM)tonitoni1998 Wrote:  You mean from the inventory? 
Yes, I want to remove 1 .ent from the inventory (If you have 3 health potions - I want to remove 1)
			  
			
			
			
		 |  
	 
 | 
 
	| 03-14-2013, 05:50 PM  | 
	
		
	 | 
 
 
	
		
		tonitoni1998 
 
 
		
			Member 
			
			
			
 
			
	Posts: 163 
	Threads: 54 
	Joined: Oct 2012
	
 Reputation: 
1
		
	 | 
	
		
			
RE: How to remove Item (Entity)? 
			 
			
				Well thats already what you have. Its RemoveItem(string asName);  
All scripts are in the wiki  http://wiki.frictionalgames.com/hpl2/amn..._functions   use F3 ctrl+f to browse the whole page.
			  
			
			
 
When you are looking for someone, to do the scripting for your Custom Story, ask me! 
			
		 |  
	 
 | 
 
	| 03-14-2013, 05:54 PM  | 
	
		
	 | 
 
 
	
		
		ehovda321 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 38 
	Threads: 22 
	Joined: Dec 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: How to remove Item (Entity)? 
			 
			
				 (03-14-2013, 05:54 PM)tonitoni1998 Wrote:  Well thats already what you have. Its RemoveItem(string asName);  
 
All scripts are in the wiki http://wiki.frictionalgames.com/hpl2/amn..._functions   use F3 ctrl+f to browse the whole page. 
Yeah, but bro- here's the problem, the RemoveItem(); function can not be used with an .ent at the end...   
 
 (03-14-2013, 05:54 PM)tonitoni1998 Wrote:  Well thats already what you have. Its RemoveItem(string asName);  
 
All scripts are in the wiki http://wiki.frictionalgames.com/hpl2/amn..._functions   use F3 ctrl+f to browse the whole page. 
and btw - I've already developed 3 custom stories, so I know where the script functions are... xD
			  
			
			
			
				
(This post was last modified: 03-14-2013, 05:57 PM by ehovda321.)
 
				
			 
		 |  
	 
 | 
 
	| 03-14-2013, 05:56 PM  | 
	
		
	 | 
 
 
	
		
		tonitoni1998 
 
 
		
			Member 
			
			
			
 
			
	Posts: 163 
	Threads: 54 
	Joined: Oct 2012
	
 Reputation: 
1
		
	 | 
	
		
			
RE: How to remove Item (Entity)? 
			 
			
				Oh :x sorry i thought you're a newbie   
			 
			
			
 
When you are looking for someone, to do the scripting for your Custom Story, ask me! 
			
		 |  
	 
 | 
 
	| 03-14-2013, 06:02 PM  | 
	
		
	 | 
 
 
	
		
		ehovda321 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 38 
	Threads: 22 
	Joined: Dec 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: How to remove Item (Entity)? 
			 
			
				 (03-14-2013, 06:02 PM)tonitoni1998 Wrote:  Oh :x sorry i thought you're a newbie   
No problem, thanks for your help. I'm developing a store in my mod, I've got everything set up- but when you "SELL" items, I want it to remove .ent files from your inventory.
			  
			
			
			
		 |  
	 
 | 
 
	| 03-14-2013, 06:05 PM  | 
	
		
	 | 
 
 
	
		
		tonitoni1998 
 
 
		
			Member 
			
			
			
 
			
	Posts: 163 
	Threads: 54 
	Joined: Oct 2012
	
 Reputation: 
1
		
	 | 
	
		
			
RE: How to remove Item (Entity)? 
			 
			
				Nice idea actually.
			 
			
			
 
When you are looking for someone, to do the scripting for your Custom Story, ask me! 
			
		 |  
	 
 | 
 
	| 03-14-2013, 06:08 PM  | 
	
		
	 | 
 
 
	
		
		ehovda321 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 38 
	Threads: 22 
	Joined: Dec 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: How to remove Item (Entity)? 
			 
			
				 (03-14-2013, 06:08 PM)tonitoni1998 Wrote:  Nice idea actually. 
Thanks! I've figured out what to do... but it's gonna add like 700 lines to my code... lol
			  
			
			
			
		 |  
	 
 | 
 
	| 03-14-2013, 06:12 PM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: How to remove Item (Entity)? 
			 
			
				You're supposed to provide the (internal) name of the item, not the file name, to RemoveItem. If the item was picked up from the environment, then it should be the entity name. If it was given through a script, then you were the one that gave it a name. 
 
Also, 700+ lines of code for a merchant script? That sounds absurd.
			 
			
			
 
			
				
(This post was last modified: 03-14-2013, 09:06 PM by Your Computer.)
 
				
			 
		 |  
	 
 | 
 
	| 03-14-2013, 09:06 PM  | 
	
		
	 | 
 
 
	 
 |