• 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 Help

Smittyman

Member
All,

I've scoured the forum and I can't seem to find an example to look at for what I'm trying to do. Basically I'm trying to create a new race with a racial special that gives them a +2 to perception. I can easily do that one if I keep it simple, but what I'm trying to do is make this one conditional. I want it to only apply the +2 to perception if the character is not wearing any armor above the waist, or if the character is wearing one or more specific armor(s) that I have created in the editor. However, if they are wearing any of the "out of the box" armors that are in system then I do not want the +2 racial bonus to their perception applied. Does anyone know how I'd go about writing the conditional statement to do that within the eval script for the racial special ability I've created? Any help would be greatly appreciated. I've been trying to make this work for a few hours now and I just can't figure it out. Thanks in advance.

Mike
 
I don't think there is a way to determine whether a particular armor extends above the waist, other than pre-defining a list of armors that are ok. Is that the route you'd like to go?
 
Something along these lines:

Post Level 10000
Code:
~ Set our bonus to 2
field[abValue].value += 2

~ We're going to cycle through all equipped armor, and if any one of the armors isn't on our "approved list" then we've got a problem.
var hasbadarmr as number

foreach pick in hero from BaseArmor where "Helper.CurrArmor"
  if (eachpick.tagis[IsArmor.WHATEVER1] + eachpick.tagis[IsArmor.WHATEVER2] AND SO ON = 0) then
    hasbadarmr = 1
    endif
  nexteach

~ Now stop if we have equipped bad armor
doneif (hasbadarmr <> 0)

#racialbonus[skPercep] += field[abValue].value

WHATEVER1 and WHATEVER2 and SO ON are the list of your approved armor's unique IDs.
 
Back
Top