User Tools

Site Tools


crpl:docs:getcoreswithvar

<- CRPL reference <- Unit Commands

GetCoresWithVar

ArgumentsResultNotation
VariableName, Value List of unit uids, amount of units s1 d1 – l1 l2…ln n

Description

Searches across all CRPLCore units looking for any that have a script that contains the specified variable with the specified value. Useful for finding units by name, or other value. The function pushes the n UID's onto the stack followed by the integer n, where n is the number of units.

Note that a single core can have multiple scripts assigning VariableName to different values, any of which can be used to find the core.

Examples

"UnitName" "Item1" GetCoresWithVar
0 do
   ->unit
   <-unit trace
loop 

crpl/docs/getcoreswithvar.txt · Last modified: 2021/02/05 11:43 by Karsten75