HudBarSetBarTrait
From GECK
A function added by the SUP NVSE Plugin.
Contents
Description
Sets the value for a Bar's Trait. Returns 1 for success, -1 for failure. See Notes for possible Trait values.
Syntax
(success:int) HudBarSetBarTrait barName:string Trait:int Value:float/int
Or:
(success:int) HBSetBarTrait barName:string Trait:int Value:float/int
Example
HudBarSetBarTrait "BarName" 0 1
Will make Bar show only in gamemode.
HudBarSetBarTrait "BarName" 23 1
Will make Bar hide in combat.
HudBarSetBarTrait "BarName" 64 0.2
Will set fGradualAppearingTimer to 0.2.
Notes
Number | Trait | Description |
---|---|---|
0 | iMenuTypeShow | 0 - Always show(Default), 1 - Show only in Gamemode, 1 - Show only in menumode |
1 | iRemoveOnGameLoad | 0 - Do not remove on game load(Default), 1 - Remove on Game Load. |
2 | fUpdateTimer | Will specify how often bar value is updated in seconds. This is used for bars which have script variables or Functions as results. |
21 | iDisableControlMovement | 1- Will hide bar when player movement controls is disabled. |
22 | iDisableWhenSneaking | 1 - Will hide bar when player is sneaking, 2- Will make bar appear ONLY when player is sneaking. |
23 | iDisableWhenCombat | 1 - Will hide bar when player is in combat, 2- Will make bar appear ONLY in combat. |
24 | iDisableWhenAiming | 1 -Will hide bar when player is aiming(through Ironsight or Skope), 2 - Will make bar appear ONLY when aiming. |
25 | iDisableWhenItemNotEquipped | 1 -Will hide bar when player doesn't have item (Weapon or Armor) equipped. Item is set via HudBarSetItem or HudBarSetFormList. |
26 | iDisableWhenWeaponOut | 1 - Will hide bar when player has their weapon out. 2- Will hide bar when player doesn't have weapon out. |
27 | iCameraModeTypeShow | 0 - Will show bar in both FP and TP,1 - Will hide bar in Third person, 2 - Will hide bar in First person. |
41 | iGradualVanishing | 1 - When bar is hidden via traits(21-26) - Bar will vanish gradually instead of instantly(by becoming transparent). |
42 | iGradualVanishingMovement | 0 - bar disappears instantly without moving,1- When vanishing Bar will move horizontally, 2 - When vanishing - Bar will move vertically. |
43 | fGradualVanishingPosShift | Specifies in pixels where Bar would move when vanishing in the direction which is specified in iGradualVanishingMovement. You can set positive and negative values, i.e. if Bar is moving horizontally positive value will move bar to the right, negative value - to the left. |
44 | fGradualVanishingTimer | How much time does it take for Bar to vanish in seconds. |
61 | iGradualAppearing | When bar is show after hidden via traits(21-26) - Bar will appear gradually instead of instantly. |
62 | iGradualAppearingMovement | 0 - bar appears instantly without moving,1- When appearing Bar will move horizontally, 2 - When appearing - Bar will move vertically. |
63 | fGradualAppearingPosShift | Specifies in pixels from where Bar would move to it's original position when appearing from the direction which is specified in iGradualAppearingMovement. You can set positive and negative values, i.e. if Bar is moving horizontally positive value will move bar to the right, negative value - to the left. |
64 | fGradualAppearingTimer | How much time does it take for Bar to appear in seconds. |
- Any combination is possible between traits 21-26. For instance - you can make it so bar appear only when aiming in combat, in other cases it will be shown.