• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

"daughter" options?

Bluefool

Well-known member
Ok, I'm trying to set up an option so that if you select one option, the daughter option appears and you can select if if you want.

I've tried setting child types, setting one option as a link to the other and its various settings, and I'm not getting it. The second option never appears.

I also tried ripping of other data files (yes, its a habit now...), and still no luck.

Can someone point me yet again to the appropriate doc section?

And before I get flamed for it, yes I have read the documentation...all of it. However, I'm not a programmer and so most of it is out of context to me or just plain greek. Finding the answer in the docs means knowing exactly how to phrase the question, which I'm learnign but its still getting there.

And, thanks again for all the info people have posted below; it got me a huge leap in understanding, and it is adding up...slowly perhaps in my case ;).
 
u can set the first option to attach a tag to the unit using unit.assign and then set the second option to have a live statement to check for this new tag. Ensure the second option has a lower priority that the first option though otherwise it won't work.

i.e u have a unit with an option that is add spears. When the unit has got spears and only when they can choose shields. Attached to the eval script for the option 'spears' is:

var retval as number
retval = unit.assign[defence.shield]

and in the live statement for the option shield is:

defence.shield

In this example the spear option is at priority 10, the shield is at priority 20
 
"daughter" options?

At 10:59 AM 1/27/2006, you wrote:

Ok, I'm trying to set up an option so that if you select one option, the daughter option appears and you can select if if you want.

I've tried setting child types, setting one option as a link to the other and its various settings, and I'm not getting it. The second option never appears.
Harkan's proposed solution works fine, but it can also be a bit complex to setup, since you have to worry about Live expressions, link priorities, and the evaluation sequence. There is a second, easier way to solve this that it sounds like you already began to try. I'll outline it in more detail, since it turns out there isn't a topic on this within the docs (so you didn't miss it!).

The technique is often referred to by Colen and myself as "chained options". Like the links in a chain, a sequence of options are connected in a cascading fashion. From the user's perspective, when Option1 is selected, Option2 appears and becomes selectable. When Option2 is selected, Option3 becomes available. If Option2 is deslected, Option3 disappears and it automatically deselected if needed. If Option1 is deselected, Option2 disappears and is automatically deselected (as if Option3, since it depends on the now-defunct Option2). It sounds like this is the exact type of behavior you want.

To set this up, you need to do a few things. I'm going to outline the simple case of two chained options, but the technique can apply to any number of them. First, create Option1 and Option2 as two separate options. Once that is done, edit Option1 and create a link within Option1 that connects to Option2. Make sure the link nature of the link to Option2 is "cost", and make sure the link nature attaching Option1 to a unit is also "cost". This will then display Option1 on the unit. If Option1 is selected, Option2 will appear.

That should be all there is to it. If this isn't working for you, start out with two brand new options that have no other settings and try it again. It's possible that other aspects of the options are gumming up the works.

Hope this helps,
Rob
 
Yahoo!

Thanks again to both of you; the "chained option" is what I was trying for, and I could have sworn that was how I had tried it....but deleting it and following your step by step got it working.

Which means 2 races down, 4 to go!
 
Back
Top