GetUIFloat
From GECK
Function Deprecated This function should no longer be used. This page has been left for historical documentation purposes only. This function has been deprecated as it is bugged, but is still preserved in its original state as multiple mods depend on its behavior. Use GetUIFloatAlt instead. |
A function added by the Fallout Script Extender.
Contents
Description
Looks up a UI trait by name and returns its numeric value. The trait name is of the format "MenuName/ElementName/ElementName/.../TraitName" as defined in the XML hierarchy for the desired menu, i.e. "MessageMenu/NoGlow_Branch/MM_Title/x". Returns -999 if UI trait was not found.
Syntax
(float) GetUIFloat traitName:string
Example
GetUIFloat "RepairServicesMenu/NOGLOW_BRANCH/RSM_MainRect/RSM_RepairList/RSM_RepairListTemplateRect:4/string"
Returns the name of the 4th item on the Repair Services menu.
GetUIFloat "BarterMenu/*:0/*:5/*:9/lb_scrollbar/_number_of_items"
Returns the number of items in the Barter menu.
Notes
- In NVSE v1.0 b9 and later, the traitName argument to Get/SetUIFloat/String() has two new capabilities. A path segment of "*" matches any child tile, and a path segment suffix of ":N" matches the N'th child tile. This is useful when accessing list box items, where the tile names are either identical, or unpredictable, or both. It is also useful when working around the length limitation described below.
Bugs
- When compiling a script in the GECK, the GECK will hang or crash if the trait name string is more than 54 characters long. The NVSE team suggests this is due to a buffer overflow in Bethesda's script parser, similar to bugs that the team found and patched in Oblivion. - Fixed for the Fallout 3 GECK since GECK Extender v0.11.