• 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

Displaying combo box

AndrewD2

Well-known member
I have a class that gives ability score bonuses based on gender. In general it's the males get +1 to something and the females get +1 to this or that (has a choice). Is there a way to make it so the selector only shows up for the females?

basically something like

if male
aSTR += 1
else
aWIS || aCHA += 1
endif

yes I know that's not actually scripted it, mostly because that's what I'm trying to figure out.

Thanks,
Andrew
 
Give the class ability a selector to choose an attribute, but fill in the candidate expression based on the character's gender.
Code:
if male
      field[usrCandid1].text = "component.BaseAttrib & (thingid.aXXX)"
else
      field[usrCandid1].text = "component.BaseAttrib & (thingid.aYYY | thingid.aZZZ)"
  endif

doneif (field[usrChosen1].ischosen = 0)

field[usrChosen1].chosen.field[Bonus].value += 1

XXX YYY and ZZZ in this case are the 3 different attributes
 
Ok, I've been working on this and it's not quite working. It displays the selector, but it says nothing to select no matter which gender is picked. I've tried the script at all different phases between 5000 and 10000 priority.

Here's what I have:

Code:
if (hero.tagcount[Hero.Male] >= 1) then
   field[usrCandid1].text = "component.BaseAttrib & (thingid.aSTR)"
else
   field[usrCandid1].text = "component.BaseAttrib & (thingid.aCHA | thingid.aWIS)"
endif

doneif (field[usrChosen1].ischosen = 0)

field[usrChosen1].chosen.field[Bonus].value += 1
 
Back
Top