This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
4rpl:commands:setunitselectable [2021/01/24 19:52] – added get/set tabs Sanian | 4rpl:commands:setunitselectable [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 12: | Line 12: | ||
===== Description ===== | ===== Description ===== | ||
Sets the selectable state of a unit. | Sets the selectable state of a unit. | ||
+ | |||
+ | If the targeted unit is selected by the player before making this call, it will remain selected until the player deselects it, then will be unselectable by the player. You may want to deselect the unit first with [[SetUnitSelected]] before calling SetUnitSelectable. | ||
+ | |||
+ | Be mindful of the order of operations, if you make a unit unselectable with SetUnitSelectable first and then try to deselect it with SetUnitSelected, | ||
===== Examples ===== | ===== Examples ===== | ||
<code 4rpl> | <code 4rpl> | ||
+ | SetUnitSelected(self false) | ||
SetUnitSelectable(self false) | SetUnitSelectable(self false) | ||
</ | </ | ||
< | < | ||