Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Gomo
Member
 
Join Date: Apr 2014
Posts: 50

Old May 11th, 2014, 10:47 AM
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?
Gomo is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old May 11th, 2014, 11:04 AM
Use menu_things for this.
Mathias is offline   #2 Reply With Quote
Gomo
Member
 
Join Date: Apr 2014
Posts: 50

Old May 11th, 2014, 11:14 AM
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>
with such errors:
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
I tried also some variation of above but always get confused with incompatibility and component issues.
Gomo is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old May 11th, 2014, 12:33 PM
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.
Mathias is offline   #4 Reply With Quote
Gomo
Member
 
Join Date: Apr 2014
Posts: 50

Old May 11th, 2014, 01:14 PM
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>
With errors:
Code:
Portal 'wpnchsr2' - Reference to incompatible field type/style/behavior based on portal type
so with my understanding of this is that for some reason I cant use field with the name.

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>
And the same one with new component in Component.core:
Code:
		 <component
    id="WpnChoice"
    name="Choose Equipped Items">
		      <field
      id="wpnChoice"
      name="Selection Tag Expression"
      type="derived"
      maxlength="1000">
      </field>   
	  
	    </component>
In other samples such field works so I don't know what's wrong.
I know there were used eval script to determine what to choose, but I have problems with that too.
Gomo is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old May 11th, 2014, 01:54 PM
You don't want to re-use an existing field for this. You'll need to create a new field just for this.
Mathias is offline   #6 Reply With Quote
Gomo
Member
 
Join Date: Apr 2014
Posts: 50

Old May 11th, 2014, 02:02 PM
I just moved
Code:
 <field
      id="wpnChoice"
      name="Selection Tag Expression"
      type="derived"
      maxlength="1000">
	        </field>
into Gear component, still have got those errors.
Gomo is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old May 11th, 2014, 05:23 PM
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.
Mathias is offline   #8 Reply With Quote
Gomo
Member
 
Join Date: Apr 2014
Posts: 50

Old May 12th, 2014, 10:06 AM
Thanks.
I had to set style="menu" in the field also.
Gomo is offline   #9 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:08 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.