~~NOTOC~~
<=[[4rpl:start| Index]]
* [[4rpl:commands:GetUnitSelectable|Get]]
* [[4rpl:commands:SetUnitSelectable|Set]]
====== SetUnitSelectable======
SetUnitSelectable(<-unit <-selectable)
===== Description =====
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, the SetUnitSelected call will fail, because the unit isn't selectable. So deselect the unit first, then make it unselectable.
===== Examples =====
SetUnitSelected(self false)
SetUnitSelectable(self false)
<=[[4rpl:start| Index]]