IsEquippedWeaponMelee

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 melee type. If no weapon is equipped, the function defaults to 1 (for default fists).

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

Syntax

[help]
(isMelee:bool) actorRefr.IsEquippedWeaponMelee

Example

short bIsMelee

let bIsMelee := player.IsEquippedWeaponMelee

Will return true if the player has a melee weapon equipped.

Notes

  • Internally, this function does nothing more than check if the weapon's type is <= 2.
  • 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