This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
4rpl:commands:setunitselectable [2021/01/08 16:01] – external edit 127.0.0.1 | 4rpl:commands:setunitselectable [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
< | < | ||
+ | |||
+ | <WRAP tabs> | ||
+ | * [[4rpl: | ||
+ | * [[4rpl: | ||
+ | </ | ||
====== SetUnitSelectable====== | ====== SetUnitSelectable====== | ||
Line 7: | 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) | ||
</ | </ | ||
< | < | ||