Member
Join Date: Apr 2014
Posts: 50
|
I need a drop-down menu for choosing weapons in Tactical Console.
So far I tried various approaches, but none works. I tried to set-up menu_array several times in various places. I would post some code but basically nothing works so there is nothing to post. How should I set it up? |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Use menu_things for this.
|
#2 |
Member
Join Date: Apr 2014
Posts: 50
|
I tried sth like this:
Code:
<portal id="wpnchsr2" style="menuNormal"> <menu_things field="grStkName" component="Gear" maxvisible="20" usepicksfield="adjUsePick" candidatefield="opCandid"> <candidate>!Equipment.Natural</candidate> </menu_things> </portal> Code:
Template 'tacPick' - Reference to portal 'wpnchsr2' using a field for a different component set Portal 'wpnchsr2' - Reference to incompatible field type/style/behavior based on portal type Portal 'wpnchsr2' - A candidate tag expression and a field-based candidate reference are mutually exclusive |
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Study the wiki page on how fields are defined - you need different settings to create a field that goes along with a menu_things than to create the field to go along with a menu_array.
|
#4 |
Member
Join Date: Apr 2014
Posts: 50
|
Well I read them in some part but I can understand only parts that I used.
Right now I have problem with figuring out which field is bad: field="grStkName" or candidatefield="opCandid". When I changed "grStkName" to "name" or "livename" I've got one error less. I tried this: Code:
<portal id="wpnchsr2" style="menuNormal"> <menu_things field="name" component="Gear" maxvisible="20" usepicks="hero" > <candidate>Equipped.?</candidate> </menu_things> </portal> Code:
Portal 'wpnchsr2' - Reference to incompatible field type/style/behavior based on portal type I also tried: to use field from Actor component like this: Code:
<field id="wpnChoice" name="Selection Tag Expression" type="derived" maxlength="1000"> ]]></eval> --> </field> Code:
<component id="WpnChoice" name="Choose Equipped Items"> <field id="wpnChoice" name="Selection Tag Expression" type="derived" maxlength="1000"> </field> </component> I know there were used eval script to determine what to choose, but I have problems with that too. |
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
You don't want to re-use an existing field for this. You'll need to create a new field just for this.
|
#6 |
Member
Join Date: Apr 2014
Posts: 50
|
I just moved
Code:
<field id="wpnChoice" name="Selection Tag Expression" type="derived" maxlength="1000"> </field> |
#7 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
As I said - study what options you can assign to a field. The first thing you'll need to change is that this is a user-controlled menu - that means it can't be type="derived" - derived fields can only be changed by scripts, not by the user.
|
#8 |
Member
Join Date: Apr 2014
Posts: 50
|
Thanks.
I had to set style="menu" in the field also. |
#9 |
|
|