Senior Member
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
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! |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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. |
#2 |
Senior Member
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
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! |
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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) Main hand only test: Code:
doneif(field[gIsEquiped].value = 0) 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. |
#4 |
Senior Member
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
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! |
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
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. |
|
#6 |
Senior Member
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
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! |
#7 |
|
|