Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[CLOSED] Combine Inventory
theyhunger Offline
Junior Member

Posts: 13
Threads: 5
Joined: Jul 2017
Reputation: 0
#1
[CLOSED] Combine Inventory

Just like the hand drill in the original game, I want to combine the four stencils to make a conjoined one for a puzzle. Oh, and it doesn't work, :/

inventory.hps:

////////////////////////////
// Run at the start of the game.
void OnGameStart()
{
//---- LEVEL 07 ----//
AddCombineCallback("stencil_1_2", "stencil01", "stencil02", "CombineStencil", false);
AddCombineCallback("stencil_1_3", "stencil01", "stencil03", "CombineStencil", false);
AddCombineCallback("stencil_1_4", "stencil01", "stencil04", "CombineStencil", false);
AddCombineCallback("stencil_2_3", "stencil02", "stencil03", "CombineStencil", false);
AddCombineCallback("stencil_2_4", "stencil02", "stencil04", "CombineStencil", false);
AddCombineCallback("stencil_3_4", "stencil03", "stencil04", "CombineStencil", false);
}

////////////////////////////////////
//BEGIN LEVEL 07 - COMBINE STENCIL//
void CombineStencil(string &in asItemA, string &in asItemB)
{
if(GetLocalVarInt("StencilCount") != 4){
SetInventoryMessage("Inventory", "CombineLevel07Error", -1);
return;
}

PlayGuiSound("12_make_drill", 1.0f);

AddPlayerSanity(10);

for(int i=1;i<=4;i++) RemoveItem("stencil0"+i);

GiveItem("afixstencil", "Puzzle", "stencil05", "stencil05.tga", 0);
}
//END LEVEL 07 - COMBINE STENCIL//
//////////////////////////////////

Once again, thanks to anyone who helps.





EDIT: I decided to scrap this part. Please ignore this question. Thank you. Smile
(This post was last modified: 06-22-2018, 01:08 PM by theyhunger.)
06-22-2018, 10:28 AM
Find Reply




Users browsing this thread: 1 Guest(s)