LIMIT
This script will limit instances based on conditions.
FORMAT: instances LIMIT offset, select or instances LIMIT select
ARGUMENTS:
- Instances: Quoted text, specifying the label you wish to count in the front timeline or instances (which can be grouped using OR, AND, NOT).
- Offset: The offset to start counting (e.g., 1 = will skip the first instance). If offset < 0 then it will count from the end (e.g., -1 = will start the count at the last instance). This can be left out if the offset is 0.
- Select: The number of instances to select. If it is set to select < 0, it will select up to the end value (-1 = last, -2 = second to last, etc.)
EXAMPLE 1
$var = instances limit 2
show count $var
This will grab the first two instances.
EXAMPLE 2
$var = instances limit 4, 2
show count $var
This will offset four instances and select the next two, showing the fifth and sixth instances.
EXAMPLE 3
$var = instances limit -2, -2
show count $var
This will count two from the end and select up to the second to last instance. This will show only the second to last instance.