User Tools

Site Tools


4rpl:commands:setunitselectable

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:setunitselectable [2021/01/24 14:52] – added get/set tabs Sanian4rpl:commands:setunitselectable [2022/07/03 11:21] (current) Grabz
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, the SetUnitSelected call will fail, because the unit isn't selectable. So deselect the unit first, then make it unselectable.
  
 ===== Examples ===== ===== Examples =====
 <code 4rpl> <code 4rpl>
 +SetUnitSelected(self false)
 SetUnitSelectable(self false) SetUnitSelectable(self false)
 </code> </code>
 <=[[4rpl:start| Index]] <=[[4rpl:start| Index]]
  
4rpl/commands/setunitselectable.1611517945.txt.gz · Last modified: 2021/01/24 14:52 by Sanian