User Tools

Site Tools


4rpl:commands:getunitsbytype

Differences

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

Link to this comparison view

Next revision
Previous revision
4rpl:commands:getunitsbytype [2020/08/02 16:11] – external edit 127.0.0.14rpl:commands:getunitsbytype [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ~~NOTOC~~ ~~NOTOC~~
 +<=[[4rpl:start| Index]]
  
-====== GETUNITSBYTYPE ====== +====== GetUnitsByType ====== 
-GetUnitsInRange(<-unitType <-builtState) ->units+GetUnitsByType(<-unitType <-builtState) ->units
  
 ===== Description ===== ===== Description =====
-Returns list of units with a type of unitType.\\ +Returns list of units of the specified unitType((Any of the core [[unit types]] or the GUID of custom unit.)) and builtState, ordered((The unit within this list with the lowest/smallest UID (first ever created unit of its type) will always be located at the first index (if it qualifies for the builtState). The unit with the highest/greatest UID (last created unit of its type) will always be at the last index (if it qualifies for the builtState).)) from lowest to highest UID. 
-builtState is an int (either 0,1,2). 0 = ignore built state. 1 = Only find units that are built. 2 = Only find units that are not built.\\+ 
 +builtState is an int (either 0,1,2). 0 = ignore built state. 1 = Only find units that are built. 2 = Only find units that are not built. 
  
 ===== Examples ===== ===== Examples =====
 <code 4rpl> <code 4rpl>
-GetUnitsByType("Tower") ->units+GetUnitsByType("Tower" 1) ->units
 </code> </code>
 +<=[[4rpl:start| Index]]
  
4rpl/commands/getunitsbytype.1596384716.txt.gz · Last modified: 2025/02/14 14:56 (external edit)