Difference between revisions of "User:DragoonWraith/NifGetAltGrip"

Jump to navigation Jump to search
no edit summary
imported>DragoonWraith
imported>DragoonWraith
Line 1: Line 1:
<!-- Begin Search Terms
<!-- Begin Search Terms
  Nif
  Nif
  Toggle
  Get
  Handedness
  Alt
Grip
End Search Terms -->
End Search Terms -->
A command for [[:Category:NifScript|NifScript]]
A command for [[:Category:NifScript|NifScript]]


'''Syntax:'''
'''Syntax:'''
  (bool:success) ''[ref:weapon.]''NifToggleHandedness ''[ref:weapon]''
  (string_var:path) ''[ref:weapon.]''NifGetAltGrip ''[ref:weapon]''


Changes a weapon from one-handed to two-handed and vice versa, including changing the model to the opposite-handed version. If necessary, it also creates that model.
Returns the path (relative to the Data\Meshes folder) to a version of the weapon's model that uses the opposite number of hands. Creates that model if necessary.


'''Example:'''
'''Example:'''
  set Weapon to player.GetEquippedObject 16
  set Weapon to player.GetEquippedObject 16
  NifToggleHandedness Weapon
  set pathString to NifGetAltGrip Weapon
if ( pathString )
  SetModelPathEx "%z" pathString Weapon


Weapon will be now wielded with one fewer or more hands.
If Weapon was a one-handed blade or blunt weapon, it will now be a two-hander. If two-handed blade or blunt weapon, a one-hander. If a Bow or Staff, or if the player it unarmed, nothing happens.
 
[[Category: Functions (NifScript)|NifGetAltGrip]]

Navigation menu