• 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

gIsEquipped question

Mergon

Well-known member
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.
 
Shadow:

In addition?

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

Som this is not a bug then?
 
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)
 
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)
 
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.
 
Back
Top