IsWeaponMelee

From GECK
Jump to: navigation, search


A function added by the ShowOff NVSE Plugin.

Description

A convenience function that returns true if the weapon's BaseForm is of melee type. Can be used as a condition. If the weapon:baseForm argument is omitted, the function instead checks the weapon reference's base form.

Syntax

[help]
(isMelee:bool) weapRefr.IsWeaponMelee weapon:baseForm

Example

short bIsMelee

let bIsMelee := IsWeaponMelee BMWeapNailBoard

Returns true, since BMWeapNailBoard's weapon type is "TwoHandMelee".

Notes

  • Internally, this function does nothing more than check if the weapon's type is <= 2. The same result could be achieved with GetWeaponType.

See Also