[Questions] Weapon stat: Reach
Posted: Thu Dec 30, 2010 8:22 pm
Hello!
I m working on a script to make weapon limitations (as Daggerfall did) on classes.
After a short research, I decided that the best way to achieve this, is only the weapon stat: Reach
For this reason I worked with GetWeaponReach function.
I managed to get the weapon reach, for every weapon an actor is using on a message.
But...
When I m trying to use it, in a IF statement, I dont get any results.
I really dont know what may be the problem for that.
I m thinking the possible way, that the reach stat may change on every actor, as encumbrance does.
And I m looking for a way to get the base reach....
An example of the script:
(The 0.8000 value is from OOO)
ref NPC
ref Weapon
short WeaponType
float WeaponSkill
Begin GameMode
set NPC to GetSelf
set Weapon to NPC.GetEquippedObject 16
set Weapontype to GetWeaponType Weapon
set WeaponSkill to GetWeaponReach Weapon
MessageEX "%1.5f and %.0f" WeaponSkill WeaponType
If ( WeaponType == 2 ) && ( WeaponSkill == 0.8000 ) <-- NOT WORKING
PrintToConsole "%n holds a Mace" NPC
endif
END
I d appreciate any help.
Thanks and Happy new year.
I m working on a script to make weapon limitations (as Daggerfall did) on classes.
After a short research, I decided that the best way to achieve this, is only the weapon stat: Reach
For this reason I worked with GetWeaponReach function.
I managed to get the weapon reach, for every weapon an actor is using on a message.
But...
When I m trying to use it, in a IF statement, I dont get any results.
I really dont know what may be the problem for that.
I m thinking the possible way, that the reach stat may change on every actor, as encumbrance does.
And I m looking for a way to get the base reach....
An example of the script:
(The 0.8000 value is from OOO)
ref NPC
ref Weapon
short WeaponType
float WeaponSkill
Begin GameMode
set NPC to GetSelf
set Weapon to NPC.GetEquippedObject 16
set Weapontype to GetWeaponType Weapon
set WeaponSkill to GetWeaponReach Weapon
MessageEX "%1.5f and %.0f" WeaponSkill WeaponType
If ( WeaponType == 2 ) && ( WeaponSkill == 0.8000 ) <-- NOT WORKING
PrintToConsole "%n holds a Mace" NPC
endif
END
I d appreciate any help.
Thanks and Happy new year.