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
How combine two Items?
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#11
RE: How combine two Items?

Oh I forgot to
Post my Script


void Expoxy(string &in asItemA, string &in asItemB)
{
PlayGuiSound("12_epoxy_fill.snt", 1.0f);
RemoveItem("Chemie");
RemoveItem("Flasche");
GiveItem("Spreng", "chemical_container_half", "", "chemical_container_half.tga", 1);
}

void OnGameStart()
{
AddCombineCallback("", "Flasche", "Chemie", "Expoxy", false);
}

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


04-06-2012, 01:51 PM
Find
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#12
RE: How combine two Items?

void OnGameStart()

Cool function. When is it called? Wink


Noob scripting tutorial: From Noob to Pro

04-06-2012, 01:55 PM
Find
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#13
RE: How combine two Items?

i Replaced void OnGameStart()
with void OnStart()

But the result is the same


void Expoxy(string &in asItemA, string &in asItemB)
{
PlayGuiSound("12_epoxy_fill.snt", 1.0f);
RemoveItem("Chemie");
RemoveItem("Flasche");
GiveItem("Spreng", "chemical_container_half", "", "chemical_container_half.tga", 1);
}

void OnStart()
{
AddCombineCallback("", "Flasche", "Chemie", "Expoxy", false);
}

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


04-06-2012, 02:06 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#14
RE: How combine two Items?

(04-06-2012, 01:55 PM)Cranky Old Man Wrote:
void OnGameStart()

Cool function. When is it called? Wink
void OnGameStart is only used in Inventory.hps



04-06-2012, 03:54 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#15
RE: How combine two Items?

Don't capitalize the file name for inventory.hps. This may have issues on operating systems other than Windows.

Tutorials: From Noob to Pro
04-06-2012, 05:32 PM
Website Find




Users browsing this thread: 1 Guest(s)