Timotej 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 5 
	Threads: 2 
	Joined: Aug 2012
	
 Reputation: 
0
		
	 | 
	
		
			
Combining script isn´t working. Please help 
			 
			
				Hey everyone 
I am trying to make a script of combining an obsidian("rock") and a guiding rod ("stick") to make a hammer. 
Unfortunately, the script isn´t working. Can you tell me where´s the problem? 
 
My inventory.hps looks like this. 
 
 
void OnStart() 
{ 
AddCombineCallback("", "stick", "rock", "CombineFunc", true);  
} 
void CombineFunc(string &in asItemA, string &in asItemB) 
{ 
PlayGuiSound("15_make_hammer", 1.0f); 
RemoveItem("stick"); RemoveItem("rock"); 
GiveItem("stone_hammer", "Puzzle", "stone_hammer", "stone_hammer.tga", 0);  
}
			 
			
			
			
				
(This post was last modified: 08-09-2012, 10:01 PM by Timotej.)
 
				
			 
		 |  
	 
 | 
 
	| 08-09-2012, 08:58 PM  | 
	
		
	 | 
 
 
	
		
		Melvin 
 
 
		
			Member 
			
			
			
 
			
	Posts: 245 
	Threads: 38 
	Joined: Jun 2012
	
 Reputation: 
5
		
	 | 
	
		
			
RE: Combining script isn´t working. Please help 
			 
			
				void OnStart() 
{ 
AddCombineCallback("", "stick", "rock", "CombineFunc", true); 
} 
 
void CombineFunc(string &in asItemA, string &in asItemB) 
{ 
PlayGuiSound("15_make_hammer", 1.0f); 
RemoveItem("stick");  
RemoveItem("rock"); 
GiveItem("stone_hammer", "Puzzle", "stone_hammer", "stone_hammer.tga", 0);  
} 
 
 
void OnLeave() 
{ 
} 
 
 
This should work, if not, try looking into your leveleditor for typos or capital letters. 
what exactly isn't working? Can you be a little more specific?
			 
			
			
 
			
		 |  
	 
 | 
 
	| 08-09-2012, 10:47 PM  | 
	
		
	 | 
 
 
	
		
		Timotej 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 5 
	Threads: 2 
	Joined: Aug 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Combining script isn´t working. Please help 
			 
			
				 (08-09-2012, 10:47 PM)SmokeMelvin Wrote:  void OnStart() 
{ 
AddCombineCallback("", "stick", "rock", "CombineFunc", true); 
} 
 
void CombineFunc(string &in asItemA, string &in asItemB) 
{ 
PlayGuiSound("15_make_hammer", 1.0f); 
RemoveItem("stick");  
RemoveItem("rock"); 
GiveItem("stone_hammer", "Puzzle", "stone_hammer", "stone_hammer.tga", 0);  
} 
 
 
void OnLeave() 
{ 
} 
 
 
This should work, if not, try looking into your leveleditor for typos or capital letters. 
what exactly isn't working? Can you be a little more specific? I tried this and it is still saying "Combination does not work"
			  
			
			
			
		 |  
	 
 | 
 
	| 08-10-2012, 10:46 AM  | 
	
		
	 | 
 
 
	
		
		Fearlessagent 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 12 
	Threads: 2 
	Joined: Jul 2012
	
 Reputation: 
1
		
	 | 
	
		
			
RE: Combining script isn´t working. Please help 
			 
			
				 (08-10-2012, 10:46 AM)Timotej Wrote:   (08-09-2012, 10:47 PM)SmokeMelvin Wrote:  void OnStart() 
{ 
AddCombineCallback("", "stick", "rock", "CombineFunc", true); 
} 
 
void CombineFunc(string &in asItemA, string &in asItemB) 
{ 
PlayGuiSound("15_make_hammer", 1.0f); 
RemoveItem("stick");  
RemoveItem("rock"); 
GiveItem("stone_hammer", "Puzzle", "stone_hammer", "stone_hammer.tga", 0);  
} 
 
 
void OnLeave() 
{ 
} 
 
 
This should work, if not, try looking into your leveleditor for typos or capital letters. 
what exactly isn't working? Can you be a little more specific? I tried this and it is still saying "Combination does not work" OnStart() should be  OnGameStart() in inventory.hps
			  
			
			
			
		 |  
	 
 | 
 
	| 08-13-2012, 09:14 PM  | 
	
		
	 | 
 
 
	
		
		Timotej 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 5 
	Threads: 2 
	Joined: Aug 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Combining script isn´t working. Please help 
			 
			
				 (08-13-2012, 09:14 PM)Fearlessagent Wrote:   (08-10-2012, 10:46 AM)Timotej Wrote:   (08-09-2012, 10:47 PM)SmokeMelvin Wrote:  void OnStart() 
{ 
AddCombineCallback("", "stick", "rock", "CombineFunc", true); 
} 
 
void CombineFunc(string &in asItemA, string &in asItemB) 
{ 
PlayGuiSound("15_make_hammer", 1.0f); 
RemoveItem("stick");  
RemoveItem("rock"); 
GiveItem("stone_hammer", "Puzzle", "stone_hammer", "stone_hammer.tga", 0);  
} 
 
 
void OnLeave() 
{ 
} 
 
 
This should work, if not, try looking into your leveleditor for typos or capital letters. 
what exactly isn't working? Can you be a little more specific? I tried this and it is still saying "Combination does not work" OnStart() should be OnGameStart() in inventory.hps Still not working.
			  
			
			
			
		 |  
	 
 | 
 
	| 08-14-2012, 10:47 PM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: Combining script isn´t working. Please help 
			 
			
				Where'd you put your inventory.hps file?
			 
			
			
 
			
		 |  
	 
 | 
 
	| 08-14-2012, 10:53 PM  | 
	
		
	 | 
 
 
	 
 |