Frictional Games Forum (read-only)

Full Version: Inventory.hps
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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.
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
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.