View Single Post
Senior Member
Join Date: Sep 2017
Posts: 417

Old April 23rd, 2021, 10:46 AM
I'm totally unfamiliar with act_level. We normally test for total levels using a macro "if (#totallevelcount[] >= X) then". But that's not what you're asking.

Your code is testing to see if the tag "IsWeapon.wUnarmed" is present on the Thing that's running the code. You don't mention whether it's a feature, weapon, etc. But regardless, you're not testing the hero for anything here. That tag is used to tell Hero Lab to treat something as if it's an Unarmed Strike (for example, we add that tag to the Tabaxi's Claws or a Centaur's hooves).

What you're looking for are tests whether the Hero has something in either of their hands. There's three tags you may want to look at:
  • Hero.EquipMain - if something is in the hero's main hand, this will be present on the hero
  • Hero.EquipOff - if something is in their offhand, this will be present on the hero
  • Hero.EquipWep - if the hero has a weapon equipped, this will be present on the hero

If you want to test whether the hero's hands are totally free, test for the first two, either using nested if statements or two doneif statements. Here's the latter:

doneif (hero.tagis[Hero.EquipMain] <> 0)
doneif (hero.tagis[Hero.EquipOff] <> 0)
The third tag might work on its own instead, if you're okay with this thing working even while something like a shield is equipped. If not, use the first two.

Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub.

Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts!
Fenris447 is online now   #2 Reply With Quote