The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Inventory Script File (How to combine two items)
anzki Offline
Member

Posts: 88
Threads: 6
Joined: Apr 2010
Reputation: 1
#1
Inventory Script File (How to combine two items)

I have tried to make two items to combine and found a thread where Jens told someone to put the script to inventory file. Well I made such file and tried to make items to combine, and I got the combine part working; it does not complain that "this combination does not work". However the function does not happen, so they combine(I think) but nothing happens.

Here is inventory file:
Spoiler below!

void OnGameStart()
{
AddCombineCallback("", "glass_container_blood_1", "wooden_bucket_filled_1", "MakeExplosion", false);
}
void MakeExplosion(string& asName, string& asItemA, string& asItemB, string& asFunction, bool abAutoDestroy)
{
   GiveItem("Explosion1", "Explosion", "", "glass_container_mix_notdone", 1.0f);
   RemoveItem(asItemA); RemoveItem(asItemB);
}


But do I need to add something to level script file also... Or what is wrong with that code?

EDIT: And should I place the "inventory.hps" to some specific folder?

EDIT2:I had forgotten "()" behind "OnGameStart", added them and tested; no effect...

[Image: 2qnr5av.png]
10-20-2010, 07:08 PM
Find


Messages In This Thread
Inventory Script File (How to combine two items) - by anzki - 10-20-2010, 07:08 PM
RE: Inventory Script File - by house - 10-20-2010, 08:08 PM
RE: Inventory Script File - by anzki - 10-20-2010, 08:21 PM
RE: Inventory Script File - by house - 10-23-2010, 07:06 AM
RE: Inventory Script File - by Pandemoneus - 10-20-2010, 08:46 PM
RE: Inventory Script File - by anzki - 10-21-2010, 08:27 AM



Users browsing this thread: 1 Guest(s)