• 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

Removing an option when selecting another option.

Bluefool

Well-known member
Title kind of says it all, I'm trying to figure out how when an option is selected, you can remove another option.

Basically, the unit has a grenade launcher by default. If they take a laser, it replaces the grenade launcher. Creating both options, no problem, but I can't figure out how to get rid of the other one.

And, since I see it coming up, how can an option replace a unit? For instance, if a unit has an option of a suit that changes its unit type, how the heck do you do that?
 
At 07:11 PM 2/9/2006 -0500, you wrote:

>Title kind of says it all, I'm trying to figure out how when an
>option is selected, you can remove another option.
>
>Basically, the unit has a grenade launcher by default. If they take
>a laser, it replaces the grenade launcher. Creating both options, no
>problem, but I can't figure out how to get rid of the other one.


Make an exclusion group called "Weps" (or something) with a minimum
of 0 and a max of 1. Set the grenade launcher option to use "Weps" as
its Remainder group (the Remainder option on the link editing form).
Then set the laser to take up 1 "Weps" slots.


Now, when the laser isn't selected, the grenade launcher will be
selected by default. When the user selects the laser, the grenade
launcher gets deselected.


Hope this helps.



--
Colen McAlister (colen@wolflair.com)
Chief Engineer, Lone Wolf Development
http://www.wolflair.com/
 
Heh,

"Hope this helps."

That was an exact walk through of what I was trying to do :). I had to kill some child links, but it works the way I want it to now, thanks to both of you for getting me pointed the right way on that one!
 
Heya – I'm trying to do this same thing, but I receive an error (when I load up AB) after using the instructions above which seem otherwise to be right on target. The error reads:

"Remainder link references option with evaluation script for option 'Shield' on unit 'vcSkelWar'"

Shield is my exclusion group, and vcSkelWar is the unit I’m working on. Color me a newb, but I just don't see what I'm doing wrong here, or where the offending script referenced in the error dwells. Any help for me?

Thanks.

[EDIT] Never mind... found the root of my problem. Fear my newbyness :p
 
When you designate any option as the "remainder" and that option has an Evaluate script of ANY contents, the compiler will issue the error you cite below. Options that are treated as a remainder may NOT have any Evaluate script, and this detail is outlined within the docs. You need to check the option "Shield". It must have some sort of Evaluate script (e.g. to apply an armor adjustment), which is illegal with a remainder option.

There should be examples of this, along with suggestions on other ways to solve the problem, in the Kit docs.

Hope this helps,
Rob


At 09:27 PM 3/16/2006, you wrote:

Heya – I'm trying to do this same thing, but I receive an error (when I load up AB) after using the instructions above which seem otherwise to be right on target. The error reads:

"Remainder link references option with evaluation script for option 'Shield' on unit 'vcSkelWar'"

Shield is my exclusion group, and vcSkelWar is the unit I’m working on. Color me a newb, but I just don't see what I'm doing wrong here, or where the offending script referenced in the error dwells. Any help for me?

Thanks.
 
Back
Top