IsEquippedWeaponRanged

From GECK
Jump to: navigation, search


A function added by the ShowOff NVSE Plugin.

Description

A convenience function that returns true if the actor's currently equipped weapon is of Ranged type. If no weapon is equipped, the function defaults to 0.

This function can be used either in a script, or as a Condition.

Syntax

[help]
(isRanged:bool) actorRefr.IsEquippedWeaponRanged

Example

short bIsRanged

let bIsRanged := player.IsEquippedWeaponRanged

Will return true if the player has a Ranged weapon equipped. Will return false if no weapon is equipped / a melee weapon is equipped.

Notes

  • Internally, this function does nothing more than check if the weapon's type is >= 3 && <= 13.
  • Not recommended to use this function for certain perk effects, like Calculate Weap. Damage, since it will affect the DAM preview that appears in the UI for other non-equipped weapons.

See Also