• 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

Racial Special Question

Fugh

Member
I am trying to set up a racial special that lets the user choose a number between 2 and 5 and then apply it as a racial bonus to stealth. I am a bit lost but I have some experience with the editor.
 
This the special "Goblins can blend into their surroundings by subtle changes in skin color. This grants a +5 maximum bonus on Stealth checks, depending on how much of their skin is covered.

(+2 for 75% covered (Med. Armor), +3 for 50% covered (Light Armor), +4 for 25% covered (No Armor). +5 for virtually nude)" and I can set up a user selectable array but I can not figure out a way to find that selection (from my array) and turn it into the correct bonus.
 
I think the array selection is stored in the "usrSelect" field, you can pull that out and store it in the abValue field if it is a simple number, then add that to your stealth situational or as a flat bonus.
 
I had noticed that before and tried to use "usrSelect" as my skill modifier, with no results. So I tried this instead.

Code:
    ~set abValue as numerical variable
    var abValue as number

    ~set abValue as numerical varibale (HL throws up an error if I do not do this)
    var usrSelect as number

    ~set abValue to usrSelect
    abValue = usrSelect

    ~apply number in abValue to Stealth
    #skillbonus[skStealth] += abValue

It still does not work. My array choices are: 0, 2, 3, 4, 5.

The error I get is:

Hero Lab was forced to stop compilation after the following errors were detected:

Syntax error in 'eval' script for Thing 'raIKGobCam' (Eval Script '#1') on line 3
-> Reference to undeclared variable: 'usrSelect'
 
You're declaring variables, but you're not setting their values. Also, in this case it'd be better to set the value in a field, so other things can modify it.

Try this at First 10000:

Code:
    field[abValue].value += field[usrSelect].value

    ~ Add to our stealth
    #skillbonus[skStealth] += field[abValue].value
 
Thanks for the help so far. That pops up with:

Hero Lab was forced to stop compilation after the following errors were detected:

Syntax error in 'eval' script for Thing 'raIKGobCam' (Eval Script '#1') on line 7
-> Attempt to access text-based field 'usrSelect' as value.
 
Oops. Typo.

Code:
    field[abValue].value += field[usrSelect].text

    ~ Add to our stealth
    #skillbonus[skStealth] += field[abValue].value
 
Back
Top