Page 1 of 1
Can't figure out how to combine
Posted: Mon May 29, 2006 1:54 am
by Daecon
Hey everyone
I've been trying to make a thing where I have two potions, and they can be combined to make a new potion. (And leave an empty flask in the other hand.)
I can't work out how to get this to happen...
As useful as I've found the editing guide to be, I find it's no help with this particular matter.
Can anyone offer advice?
Posted: Mon May 29, 2006 2:10 am
by Sophia
The basic procedure for combining is as follows:
1. Set the CONVERT_COMBINE of each object to be what you want the result to be after the combination. In this case, one potion's result should be your new potion, and the other should be an empty flask.
2. Execute an ACTION_COMBINE, with the two potions as the two operands.
Of course, that's more or less what the editing guide says, so you'll probably have to tell me in more detail where along the line you're tripping up.
It may be the sort of thing that's hard to describe, so I could look at your dungeon for you, instead, if you like...
Posted: Mon May 29, 2006 2:22 am
by Daecon
Which tab to I use the "Additional Action: ACTION_COMBINE" function?
I tried it in the Combine tab, but when I put both items into each of the character's hands, nothing happend.
Posted: Mon May 29, 2006 2:42 am
by Sophia
I think you're misunderstanding how it works.
The COMBINE conversion is executed as a result of an ACTION_COMBINE; it's not automatic. Combinations don't happen simply as a result of placing the two objects in the hand. Something has to perform an ACTION_COMBINE. That means you need to execute this action combine somewhere-- the logical choice would be to create an attack method for the potions called "MIX", but it can be anywhere.
Say you have two potions, called POTION_A and POTION_B. POTION_A's COMBINE convert would be an empty flask. POTION_B's would be POTION_COMBINED. Then, add an attack method to both potions that executes an ACTION_COMBINE with operands of POTION_A and POTION_B. When you execute this attack method, the potions will mix.
The additional action in the CONVERT_COMBINE is to execute an additional action when the combination takes place. It has nothing to do with actually firing off the combine.
Posted: Mon May 29, 2006 3:57 am
by George Gilbert
If you havn't found it already, there's an easy-to-follow example of how to use combine in the example dungeon NewObjects.txt that comes with the RTC download.
In there, you combine a match and a bomb to create a lit bomb. As Sophia mentioned, the combine doesn't just happen on it's own, you've got to do something to cause it (in the example, you've got to *use* the match - you don't want the bomb to go off, just because you've got some matches in your hands!).
Posted: Mon May 29, 2006 6:10 am
by Daecon
Ah, thanks!
You're right, that's what I was misunderstanding.
I think I've got it now.
Posted: Mon May 29, 2006 9:43 am
by linflas
harder : is it possible to display a text when mixing the two potions generates nothing ?
something like 'Linflas mumbles a meaningless spell' but for potions/alchemy/whatever ?
Posted: Mon May 29, 2006 10:04 am
by beowuuf
Have the combine action of items, disable a counter. Filter your text display message through this counter and have a delayed by 1/6 second relay also targeting the counter at the same time as the combine. ie mix - > action_combine and activate the 'no mixing' relay. So unless you have a successful mix generated the null text gets generated
That's how i'd do it anyways