User Tools

Site Tools


4rpl:commands:setunituioptions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
4rpl:commands:setunituioptions [2024/08/24 20:45] – old revision restored (2021/01/24 14:49) Vertu4rpl:commands:setunituioptions [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 16: Line 16:
 For the Flip and Choice widget, the options are the values shown in the ui widget.\\ 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.\\+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 [[4rpl:commands:func_awake|Awake]] (triggered on the unit being loaded in) or [[4rpl:commands:func_gameloaded|Gameloaded]] (when the mission is loaded).
  
 ===== Examples ===== ===== Examples =====
 <code 4rpl> <code 4rpl>
-   SetUnitUIOptions(self 0 ListN("Larry" "Moe" "Curly" 3))+SetUnitUIOptions(self 0 ListN("Larry" "Moe" "Curly" 3)) 
 +</code> 
 +<code 4rpl> 
 +SetUnitUIOptions(self 5 Split("Larry jim,Moe Curly" ","))
 </code> </code>
 <=[[4rpl:start| Index]] <=[[4rpl:start| Index]]
  
4rpl/commands/setunituioptions.1724532302.txt.gz · Last modified: 2025/02/14 14:56 (external edit)