Can't figure out how to combine

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
Daecon
Expert
Posts: 329
Joined: Tue May 16, 2006 1:56 pm
Location: Upper Hutt, New Zealand

Can't figure out how to combine

Post 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?
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post 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...
User avatar
Daecon
Expert
Posts: 329
Joined: Tue May 16, 2006 1:56 pm
Location: Upper Hutt, New Zealand

Post 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.
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post 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.
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post 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!).
User avatar
Daecon
Expert
Posts: 329
Joined: Tue May 16, 2006 1:56 pm
Location: Upper Hutt, New Zealand

Post by Daecon »

Ah, thanks!

You're right, that's what I was misunderstanding. :)

I think I've got it now.
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post 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 ?
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post 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
Post Reply