How Do I Combine Items To Make New Items?

TextingStories
23 Jun 2012, 05:50
I did a little research and have been trying different things on my own using the UGI and although I am getting a little further, I ultimately got stuck at a dead end. So far I have found a thread about combining different fruits and a basket to create a fruit basket. Pertex gave a code to make it work. However, I need something else done and done a little differently. I want the player to have to use pen on paper (I have a pen object and a paper object) to make a letter (Which is also an object in game.) that will go into the player's Inventory. Now... I go to the Use/Give Tab and put Use pen on paper and vice versa. But I do not know how to keep the letter actually not being created until that happens. I can keep it hidden or invisible as a cheap work around, the letter can not be seen until the pen is used on paper, but if the player wanted they could type Look At letter and get a message of it's description instead of acting like it does not exist or that it has not been created yet. I thought I was getting so close until I tried it and I can still use the letter with out being able to see it.

I tried to use script in order to create the letter... but if there is no letter (I deleted the actual letter in game trying different things.) in the game to begin with I do not see it being created and when I try to move the letter that will be created to Inventory, the drop box does not show a letter to move.

Long story short, preferably using the UGI, how would I go about making that work? I tried using the code Pertex showed, but using the UGI in the game, but it hardly shows me anything in the UGI it self, like it does not understand how the code worked so I can not learn from it and merely looking at the code confuses me even more... I can even make the pen and paper disappear by destroying them if I wanted to and I can get the invisible letter into Inventory and then have it visible, but I just can not seem to get the letter to be created properly in the first place after using pen on paper. Help please.

Pertex
23 Jun 2012, 14:25
You are on the right way. You should do this with invisible/visible, I don't know why this is not working in your game. You can also do it by moving objects. Create a dummy room where all your "invisible" objects like letter are stored. In the use script move the paper to this dummy room and move the letter to the player. Really easy.
By the way, you are working with a GUI (Graphical User Interface) :D

TextingStories
23 Jun 2012, 15:14
Pertex wrote:You are on the right way. You should do this with invisible/visible, I don't know why this is not working in your game. You can also do it by moving objects. Create a dummy room where all your "invisible" objects like letter are stored. In the use script move the paper to this dummy room and move the letter to the player. Really easy.
By the way, you are working with a GUI (Graphical User Interface) :D


Well the invisible/visible is actually only with it not showing up on the players screen as in the box is not checked marked visible for the letter. (Trying to make script and trying to make it only visible after conditions are met would be a totally different and whole new problem... :( ) And yes, early this morning as I was about ready to fall asleep I thought to my self about making a dummy room, although I was just going to call it "A room with no doors, exits or windows in the void of space and time"... but yours is a lot quicker to type. :lol: Thank you and I will have to check out your file as well.

tingtingminer
07 Aug 2012, 23:21
I guess you could use the:

Use (object) on (object) thing and then run script, add to inventory, the new item 8)

Hope I helped :D

m4u
08 Aug 2012, 18:41
There is also a script called "create an item" that u can set for a specific action :)

darkangel8xt
27 Aug 2012, 02:25
Well I have a lighter and a piece of driftwood and I want to combine them to make a torch. I did everything with the lighter and the "Use this on (other obects). Then I selected the driftwood and told it to create a new object. I seemed to get everything working but when I went to play I typed "use lighter on driftwood" and it did nothing. what am i doing wrong?

Pertex
27 Aug 2012, 06:51
Don't know. Perhaps youcould post your gamefile?