HudBarSetValueScriptVar
From GECK
This article is incomplete. You can help by filling in any blank descriptions. Further information might be found in a section of the discussion page. Please remove this message when no longer necessary. |
A function added by the SUP NVSE Plugin.
Contents
Description
Hooks a script variable to Bar's Meter value.
Syntax
(success:int) HudBarSetValueScriptVar barName:string ScriptVariable:float/int iCalculateValueMax:int
Or:
(success:int) HBSetValueScriptVar barName:string ScriptVariable:float/int iCalculateValueMax:int
Example
HudBarSetValueScriptVar "barName" MyQuest.MyVariable 0
Bar meter will take value from MyQuest.MyVariable, passing it's value to the meter.
HudBarSetValueScriptVar "barName" MyQuest.MyVariable 1
Bar meter will take value from MyQuest.MyVariable, Meter value will be calculated by formula: MyQuest.MyVariable/<MaxValue>.
Notes
- Value of script variable will be turned into percentage using <MaxValue> if "iCalculateValueMax" is set to 1. If not - raw value will be passed.
- Value will be updated each instance of Bar update("fUpdateTimer" trait).
- If you are using HotReload - previously set Script Variable in this gamesession will be lost - they would need to be set again.
See Also
- HudBarSetValueFloat
- HudBarSetValueMax
- HudBarSetValuePercentage
- HudBarSetValueUDF
- ... and more in the SUP HUD Bar Functions category.