Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788

Old July 28th, 2016, 06:12 PM
Ok, I am creating a dagger that grants the character a bonus if it is equpped. Simple?

I just discovered that if you equip such a weapon in your offhand, gIsEquipped stays at a value of 0.

My question is should it be setting gIsEquipped to 1? Or another number representing being equipped to the offhand?

If so, I'll report it as a bug.

Watch your back, Conserve your ammo,
and NEVER cut a deal with a dragon!
Mergon is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old July 28th, 2016, 10:21 PM
gIs2nd is the field you have to test for in addition.

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #2 Reply With Quote
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788

Old July 29th, 2016, 01:23 AM
Shadow:

In addition?

All I wanted was something simple? Is the dagger equipped in either hand? :/

Som this is not a bug then?

Watch your back, Conserve your ammo,
and NEVER cut a deal with a dragon!
Mergon is offline   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old July 29th, 2016, 09:15 AM
This is not a bug its a feature. To test for either hand you would just do this:

Code:
doneif(field[gIsEquiped].value + field[gIs2nd].value = 0)
Now if not equipped in the main hand or off-hand the script will end.

Main hand only test:
Code:
doneif(field[gIsEquiped].value = 0)
Off-hand only test:
Code:
doneif(field[gIs2nd].value = 0)

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #4 Reply With Quote
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788

Old July 29th, 2016, 09:17 AM
So 'gIs2nd' is the equivalent of 'gIsEquiped'?

Learnt something new today.

Watch your back, Conserve your ammo,
and NEVER cut a deal with a dragon!
Mergon is offline   #5 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old July 29th, 2016, 09:19 AM
Quote:
Originally Posted by Mergon View Post
So 'gIs2nd' is the equivalent of 'gIsEquiped'?

Learnt something new today.
For the "off-hand" only. gIsEquipped is Main hand.

So just to complete the above. To test for a weapon in both hands do this:
Code:
doneif(field[gIsEquiped].value + field[gIs2nd].value <> 2)

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #6 Reply With Quote
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788

Old July 29th, 2016, 12:46 PM
Also works if you need to check whether a dagger is equipped in either hand I think. I'll test it when I get the chance.

Watch your back, Conserve your ammo,
and NEVER cut a deal with a dragon!
Mergon is offline   #7 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:49 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.