• 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

Increasing Nonlethal Damage

direinsomniac

Well-known member
As part of a conversion project I am working on, I am trying to write a script for a feat that increases the non-lethal damage done, but thus far, my attempts to identify the tag(s) that identify non-lethal damage have resulted in compilation errors.

This is the code I am working with:

Code:
if (parent.tagis[component.BaseWep] + parent.tagis[wSpecial.Nonlethal) <> 0 then
  #extradamage[parent, "+2 nonlethal",field[name].text]


I found the wSpecial using the debug tags feature on unarmed strike and a sap, two weapons I knew dealt nonlethal damage.

I run into two problems:
1) either wSpecial is a "Non-existent thing"

or

2) "Attempt to access non-existent parent pick for a top-level container from script"
 
you need to search through items with a foreach loop, there is no parent on a feat so you can't transitions that way.

try

Code:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

foreach pick in hero from BaseWep where "wSpecial.Nonlethal"
  #extradamage[eachpick, "+2 nonlethal", field[name].text]
nexteach

This is untested, but I believe it'll cover what you're trying to do.
 
Typed the code as you listed, it compiled fine. So I decided to test it out.

I set up a new hero and selected the feat, and then got this:

"Attempt to access non-existent parent pick for a top-level container from script"
 
do you have anything else in the script or could that be coming from another script? Mine doesn't have anything to do with accessing parent picks.
 
Back
Top