Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How combine two Items?
Author Message
Shives Offline
Member

Posts: 154
Joined: Jan 2012
Reputation: 1
Post: #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 all posts by this user Quote this message in a reply
Cranky Old Man Offline
Posting Freak

Posts: 925
Joined: Apr 2012
Reputation: 37
Post: #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 all posts by this user Quote this message in a reply
Shives Offline
Member

Posts: 154
Joined: Jan 2012
Reputation: 1
Post: #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 all posts by this user Quote this message in a reply
SilentStriker Offline
Posting Freak

Posts: 939
Joined: Jul 2011
Reputation: 39
Post: #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 all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,268
Joined: Jul 2011
Reputation: 223
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)