User Tools

Site Tools


4rpl:commands:setunituistate

Index

SetUnitUIState

SetUnitUIState(<-unit <-slot <-state)

Description

Sets the integer UI state 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. Each widget also has a state. For the Label and Button widgets the state is always '0'. For the FlipButton widget, the state is 0 or 1. For the Choice widget the state is 0-N based on the number of choice items configured.
Setting the state for a given unit is typically not needed. The state is usually controlled by the player interacting with UI widgets for the flip and choice widgets.

Note that this call only works on custom units. If used on a built in unit, it will do nothing.
:NOTE:
This API does not trigger the :_UICallback built-in fuction.

Examples

   SetUnitUIState(self 0 1)

Index

4rpl/commands/setunituistate.txt · Last modified: 2023/12/14 15:51 by Vertu