SetWeaponFlag

From GECK
Jump to: navigation, search


A function added by the ShowOff NVSE Plugin version 1.40.

Description

Sets the weapon BaseForm's flag at flagIndex to be enabled/disabled, depending on bFlagOn; if bFlagOn is non-zero (true), then the flag will be enabled, and otherwise (0, false), it is disabled.

If the function is called with a weapon reference (weaponRefr), its BaseForm is used.

Returns 1 if the function was successful, 0 otherwise.

Syntax

[help]
(success:0/1) weaponRefr.SetWeaponFlag flagIndex:int bFlagOn:1/0 weapon:baseForm 

Or:

(success:0/1) weaponRefr.SetWeaponHasFlag flagIndex:int bFlagOn:1/0 weapon:baseForm 

flagIndex Values

Index Weapon Flag
0 ignores normal weapon resist
1 is automatic
2 has scope
3 can't drop
4 hide backpack
5 embedded weapon
6 don't use first-person IS animations
7 nonplayable
8 player only
9 NPCs use ammo
10 no jam after reload
11 override action points
12 minor crime
13 range fixed
14 not used in normal combat
15 override damage to weapon mult
16 don't use third-person IS animations
17 short burst
18 rumble alternate
19 long burst
20 scope has night vision
21 scope from mod

Notes

See Also