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:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
String of custom combinations
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#1
String of custom combinations

Yet another question from me. I'm attempting a long string of combinations with custom items, and though I've looked at a lot of other threads, i can't seem to get mine to work. Perhaps because i don't know how internal names work.

I have a chemical_jar I'm calling "Saltpetre" in my extra_english.lang file, a chemical_jar_epoxy renamed "Salt," a flask01_calamine named "Oil of Vitriol," and a flask01_cuprite named "Ammonia."

Combining Saltpetre and Salt makes Salt Mixture, combining Salt Mixture and the Vitriol makes Aqua Regia, combining AR and Ammonia makes Auric Hydroxide.

Here's the script in my inventory.hps file which is currently placed in "custom_maps/tunnel/maps"

Spoiler below!
///////////////////////////////////
////////////COMBINATIONS///////////
///////////////////////////////////

void salt_mixture(string &in asItemA, string &in asItemB)
{
PlayGuiSound("15_make_hammer", 1.0f);
GiveItem("salt_mixture", "chemical_container", "salt_mixture", "chemical_container.tga", 0);
}


void aqua_regia(string &in asItemA, string &in asItemB)
{
PlayGuiSound("15_make_hammer", 1.0f);
GiveItem("aqua_regia", "flask01_calamine", "aqua_regia", "flask01_calamine.tga", 0);
}


void auric_hydroxide(string &in asItemA, string &in asItemB)
{
PlayGuiSound("15_make_hammer", 1.0f);
GiveItem("auric_hydroxide", "flask01_calamine", "auric_hydroxide", "flask01_calamine.tga", 0);
}

////////////////////////////
// Run at the start of the game.
void OnGameStart()
{

/////COMBOS/////
AddCombineCallback("salt_mixture", "chemical_container", "chemical_container_epoxy", "salt_mixture", true);
AddCombineCallback("aqua_regia", "salt_mixture", "flask01_calamine", "aqua_regia", true);
AddCombineCallback("auric_hydroxide", "aqua_regia", "flask01_cuprite", "auric_hydroxide", true);
}


After all this, when I try to combine "Salt" and "Saltpetre" though, it says that the combination doesn't work.

Thanks for being so patient with a newbie with so many questions.

(This post was last modified: 03-11-2012, 02:35 AM by Damascus.)
03-10-2012, 06:26 AM
Find


Messages In This Thread
String of custom combinations - by Damascus - 03-10-2012, 06:26 AM
RE: String of custom combinations - by JMFStorm - 03-10-2012, 05:45 PM
RE: String of custom combinations - by Damascus - 03-11-2012, 01:14 AM



Users browsing this thread: 1 Guest(s)