Index

SetUnitUIOptions

SetUnitUIOptions(<-unit <-slot <-optionsList)

Description

Sets the options for a given UI control slot. Custom units can have UI configuration widgets. These are configured in the CPack manager. Each widget occupies a slot, 0-7. For the Label and Button widgets the options have no effect.
For the Flip and Choice widget, the options are the values shown in the ui widget.

Note that this call only works on custom units. If used on a built in unit, it will do nothing.

:WARNING: Should you use this API, all Choice widgets will get wiped on a new gameload. It doesn't matter what widget you use this API on or what type, gameload will wipe all choice widgets. The only solution is to use this API to set all choice widgets when the unit is reloaded. You will want to use Awake (triggered on the unit being loaded in) or Gameloaded (when the mission is loaded).

Examples

SetUnitUIOptions(self 0 ListN("Larry" "Moe" "Curly" 3))
SetUnitUIOptions(self 5 Split("Larry jim,Moe Curly" ","))

Index