How to reference whether a weapon is equipped?
I'm attempting to reproduce the Bladesinger prestige class, specifically the Bladesong Style ability, but I cannot find the correct field value to reference whether or not a given weapon is wielded/equipped. If I use the script below, it returns a valid condition whenever the character possesses the weapon, whether or not it is wielded. Any help would be greatly appreciated!
Quote:
|
Anyone know the tag I'm looking for? Devs, anyone? I've tried variations on this:
if (hero.tag[IsEquip.wLongsword] <> 0) then but I keep getting errors, so I'm obviously not guessing correctly. I know there has to be some tag that indicates whether or not a given item is equipped; I just can't find it. I would greatly appreciate any help or input anyone could provide. Thanks in advance! |
You should look for the field[gIsEquip] instead.
foreach pick in hero from BaseWep where "IsWeapon.wLongsword" if (each.field[gIsEquip].value <> 0) then whatever you want to happen when equipped endif nexteach |
Hope that helps. Sleep time in Korea now.
|
Awesome!! That's exactly what I was looking for! I really appreciate your help--I've been trying to figure this out for days, and it's been driving me nuts! Thank you for helping me retain my sanity (what little of it remains...) :D
|
A revision:
Code:
|
I didn't know about the 'wIs2nd' field, but then I'm sure there are quite a few fields I don't know about. I assume it indicates a second copy of the referenced item in inventory? Since I don't have open access to the source code, I just sorta make this stuff up as I go along... :D
I used this: Quote:
|
If your ability is already requiring that nothing's equipped in the off-hand, then you don't need to test for whether the longsword's equipped in the off-hand, and can go with Lawful_g's version of the script.
|
So what exactly does the [wIs2nd] field represent? I thought at first it was to indicate a second copy of the item in the inventory, but since you referenced it in your code, I thought it must refer to a second copy of the item being equipped, but then wouldn't it be called [gIs2nd], to keep the naming conventions consistent? :confused:
|
[wIs2nd] tells you if the weapon is equipped in the off-hand or 2nd hand. The primary hand being considered the 1st hand.
So the following is basically saying that IF equipped in the primary hand or off-hand then do something: Code:
if (eachpick.field[gIsEquip].value + eachpick.field[wIs2nd].value <> 0) then |
All times are GMT -8. The time now is 12:23 AM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.