Tripication 
 
 
		
			Member 
			
			
			
 
			
	Posts: 172 
	Threads: 19 
	Joined: Dec 2011
	
 Reputation: 
6
		
	 | 
	
		
			
Inventory.hps 
			 
			
				Ok, so I was trying this earlier, but didnt really get a reply. I have my inventory.hps in [CUSTOM STORY]>maps 
And i cannot figure it out. I must be blind, i've looked through the main game's invent and just about everything else i could find, but i just cant figure it out. Theres no error report or crash, and everything else works...but this. 
 
 
void OnGameStart() 
{ 
	AddCombineCallback("mixture", "TetrodotoxinItem", "HalfDone", "CombineTexHalf", false); 
} 
 
void CombineTexHalf(string &in asItemA, string &in asItemB) 
{ 
	RemoveItem("TetrodotoxinItem"); 
	RemoveItem("HalfDone"); 
	GiveItem("Mixture", "chemical_container_full.ent", "CompletedRevarsalSyrum", "chemical_container_full.tga", 1); 
} 
_______________________________________________ 
 
Come on, i'm at the very end of the custom story and i just cant figure this crap out. Its giving me the shits beyond belife, working on it for 3 days and i cant work it out. Even if you think it is right, just say so, it still helps.
			 
			
			
 
   
 
			
				
(This post was last modified: 02-01-2012, 08:02 AM by Tripication.)
 
				
			 
		 |  
	 
 | 
 
	| 02-01-2012, 07:22 AM  | 
	
		
	 | 
 
 
	
		
		palistov 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,208 
	Threads: 67 
	Joined: Mar 2011
	
 Reputation: 
57
		
	 | 
	
		
			
RE: Inventory.hps 
			 
			
				You're trying to give the player an item of subtype "CompleteRevarsalSyrum", which doesn't exist. Change it to "Puzzle" -- there are a few preset types of item, for example: Puzzle, Tinderbox, PotionHealth, PotionOil, etc. 
 
I looked at the wiki, and it says "entry for .lang" -- it is wrong. Item subtype is its internal classification, basically what distinguishes it from other items. 
 
Also, sorry to hear you had so much trouble with this. It's the little things that get the best of us.
			 
			
			
 
			
				
(This post was last modified: 02-01-2012, 07:53 AM by palistov.)
 
				
			 
		 |  
	 
 | 
 
	| 02-01-2012, 07:50 AM  | 
	
		
	 | 
 
 
	
		
		Tripication 
 
 
		
			Member 
			
			
			
 
			
	Posts: 172 
	Threads: 19 
	Joined: Dec 2011
	
 Reputation: 
6
		
	 | 
	
		
			
RE: Inventory.hps 
			 
			
				Ok, when you say change it to "Puzzle", do you mean just do this? 
 
 
void OnGameStart() 
{ 
	AddCombineCallback("", "TetrodotoxinItem", "HalfDone", "CombineTexHalf", true); 
} 
 
void CombineTexHalf(string &in asItemA, string &in asItemB) 
{ 
	RemoveItem("TetrodotoxinItem"); 
	RemoveItem("HalfDone"); 
	GiveItem("Mixture", "chemical_container_full.ent", "Puzzle	", "chemical_container_full.tga", 1); 
} 
 
 
Or was the -- indicating i have to put something else in here? 
 
 
And another question, because the inventory is OnGameStart, does that mean i have to reload he game for the script to take effect, or can i just quick map reload...  
Its actually complete now, i cant belive all i had to do, was move the inventory.hps into the Intro folder. I feeeeell reeeaaaallyyyy stttuupppiiidddd. But thank you VERY VERY much for your help. 
+1
			
			
			
 
			
				
(This post was last modified: 02-01-2012, 08:00 AM by Tripication.)
 
				
			 
		 |  
	 
 | 
 
	| 02-01-2012, 07:54 AM  | 
	
		
	 | 
 
 
	
		
		palistov 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,208 
	Threads: 67 
	Joined: Mar 2011
	
 Reputation: 
57
		
	 | 
	
		
			
RE: Inventory.hps 
			 
			
				Yep, just like that. The item subtype is very important, because that tells the game how the item will be used. As for OnGameStart() I'm pretty certain you need to re-launch the story from the main menu. A full client restart would be the best option.
			 
			
			
 
			
		 |  
	 
 | 
 
	| 02-01-2012, 11:39 PM  | 
	
		
	 | 
 
 
	 
 |