How to merge 2 objects into one

onion
11 Oct 2013, 13:23Apologies if this is posted in the wrong place, I've only just joined and can't find a more appropriate "how-to" forum. Maybe there's a thread for FAQs, but haven't found it yet.
What I'm trying to do is merge 2 objects in an inventory into one. How would I do that?
What I'm trying to do is:
Pick up ice
Pick up glass of water
Use ice on glass of water
You now have "cold glass of water"
Thanks!
What I'm trying to do is merge 2 objects in an inventory into one. How would I do that?
What I'm trying to do is:
Pick up ice
Pick up glass of water
Use ice on glass of water
You now have "cold glass of water"
Thanks!
tbritton
12 Oct 2013, 01:47Make three objects: ice, glass, cold glass. Make cold glass invisible. When you use ice on glass, make ice and glass invisible and make cold glass visible.
You could also do it with attributes, but that gets more complicated.
You could also do it with attributes, but that gets more complicated.
HegemonKhan
12 Oct 2013, 04:33for a (more advanced) "realistic" way, I'm not sure how you'd achieve this through the GUI~Editor, as it does involves quite some good coding skill, as seen by Sora, whom has done this for us, with his~her library file:
Sora's Stackable Library ( viewtopic.php?f=18&t=3515 )
if you need help on using libraries, let us know, and we'll help you.
----------
as for some helpful links:
the libraries and sample code forum~board ( viewforum.php?f=18 )
the main page of the wiki ( http://quest5.net/wiki/Main_Page )
the tutorial ( http://quest5.net/wiki/Tutorial )
the guides ~ faqs ( http://quest5.net/wiki/How_to )
the "coding bible" pages:
http://quest5.net/wiki/Category:All_Fun ... t_Commands (page 1, range: A-S)
http://quest5.net/w/index.php?title=Cat ... h#mw-pages (page 2, range: S-Z)
enjoy
Sora's Stackable Library ( viewtopic.php?f=18&t=3515 )
if you need help on using libraries, let us know, and we'll help you.
----------
as for some helpful links:
the libraries and sample code forum~board ( viewforum.php?f=18 )
the main page of the wiki ( http://quest5.net/wiki/Main_Page )
the tutorial ( http://quest5.net/wiki/Tutorial )
the guides ~ faqs ( http://quest5.net/wiki/How_to )
the "coding bible" pages:
http://quest5.net/wiki/Category:All_Fun ... t_Commands (page 1, range: A-S)
http://quest5.net/w/index.php?title=Cat ... h#mw-pages (page 2, range: S-Z)
enjoy


onion
12 Oct 2013, 14:43Thanks for the links @HegemonKhan!
@tbritton I thought of doing exactly what you said already, but the problem is that the 2 objects I want to merge are in the inventory, and not in a certain location. So where do I put the hidden "cold glass" object?
@tbritton I thought of doing exactly what you said already, but the problem is that the 2 objects I want to merge are in the inventory, and not in a certain location. So where do I put the hidden "cold glass" object?
tbritton
12 Oct 2013, 17:22Put it in inventory. Or you can put it anyplace and then move to player and then make visible.
As I said, if you want to be more elegant you could do this with attributes.
As I said, if you want to be more elegant you could do this with attributes.
tbritton
12 Oct 2013, 18:22Now that I think about it i would probably make the glass a container. When the ice is put in the glass set a flag for the glass (cold, for example). Then when dealing with the glass, check to see if the flag "cold" is set. If it is it's a cold glass and if not it's just a glass.

jaynabonne
13 Oct 2013, 23:22I used to have a separate room (called "purgatory" or "holding") to hold objects not currently available in the game world. The room would not be accessible by any exit. You can easily move objects in and out of this place.

onion
15 Oct 2013, 06:16Thanks guys, very helpful!