• 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

Triggering options with code

noahfidanque

New member
Hi,

I am trying to set up a some-what complex unit structure, and I'd like to be able to use options to help define the unit structure.
Basically, the unit can consist of 1-3 models. The user can either build their own unit, or select from pre-defined formations. When selecting the formation, I'd like to be able to add the correct models, and trigger the options on the models that correspond to the formation. I realize I could do this (maybe, anyway) with LOTS of custom tags, many (MANY) specific units, etc... This seems REALLY complex, and my data file will be huge and unwieldy...
BUT... Is there a way I can do something like:

IF (unit.option[formation_X].selection = 1) then
SET unit.option[addModel1].selection = 1
SET unit.option[addModel2].selection = 1
SET unit.option[addModel3].selection = 1
SET unit.child[linked:model1].option[a].selection = 1
SET unit.child[linked:model1].option.selection = 1
SET unit.child[linked:model2].option[a].selection = 1
SET unit.child[linked:model2].option[c].selection = 1
SET unit.child[linked:model3].option.selection = 1
SET unit.child[linked:model3].option[c].selection = 1
ENDIF

Or something like that, anyway...

Thanks
 
Please break it down into what you're actually trying to accomplish - in AB terms or english, rather than pseudo-code, I can't really understand your if...then.

In the meantime, I'd suggest looking in the authoring kit manual, tips and tricks section, chaining options. That sounds like the sort of thing you're trying to do. You'll probably have to make two versions of each option - one version is hidden, and becomes visible when selected by the option that selects a formation, and the other version is visible to the user for use in constructing units piece-by-piece.
 
I think, from what you are describing, there is no simple way of doing this without resorting to what you were saying about lots of units with minor variations or a complex tag system. I would say from experience that which ever way you decide to go if you do then keep it as simple as possible otherwise the files become unweildy and maintenance a nightmare.
 
Back
Top