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
Combining items not responding
ApeCake Offline
Member

Posts: 116
Threads: 20
Joined: Jun 2012
Reputation: 4
#1
Combining items not responding

I was wondering if it was possible to show a custom-made message when trying to combine two items. Instead of "Combination does not work!" I want it to say "There is no need to combine these two.". I want it this way so when the player picks up a needle and a copper tube they don't instantly try to combine them and get confused when they don't get combined and think the map is bugged. I don't want the copper tube and the needle to get combined, you need them for individual things. The only thing I got so far is;

void OnStart()
{
AddCombineCallback("needle_tube", "hollow_needle", "copper_tube", "nocombineCN", false);
}


void nocombineCN(string &in asItemA, string &in asItemB)
{
//I am not sure if this is the right code for displaying the combining message
SetInventoryMessage("Messages", "nocombine", 5);

}

But when I try to combine the two nothing happens, even the "Combination does not work!" doesn't show up. I double checked and as far as I am aware are the names the same. Some help would be appreciated.
07-06-2012, 02:25 PM
Find
drunkmonk Offline
Member

Posts: 109
Threads: 7
Joined: Jun 2012
Reputation: 4
#2
RE: Combining items not responding

I can't really help much with this question as I don't know myself, but I believe the SetInventoryMessage is used for the description of the Item, not for the combination message
07-06-2012, 02:33 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#3
RE: Combining items not responding

Have you looked on this tutorial yet? Might be something you're doing wrong:
http://wiki.frictionalgames.com/hpl2/tut...iferorange

Think, before you speak Google, before you post
07-06-2012, 03:00 PM
Find
ApeCake Offline
Member

Posts: 116
Threads: 20
Joined: Jun 2012
Reputation: 4
#4
RE: Combining items not responding

Yes I have, that was my first thought, however I still have this problem.
07-06-2012, 10:51 PM
Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#5
RE: Combining items not responding

Try putting this in an inventory.hps file instead of your map script.

Keep in mind that inventory.hps uses OnGameStart() instead of OnStart()

07-07-2012, 02:42 AM
Find




Users browsing this thread: 1 Guest(s)