-
Notifications
You must be signed in to change notification settings - Fork 6
Using Selectors
SlimeCubed edited this page Jul 29, 2021
·
3 revisions
Some commands have a selector parameter. This is used to select a set of objects to carry out the command on.
Selectors are formatted as follows:
[group?],[filter1?],[filter2?],...
group - The group of objects to start with. This may be omitted, in which case all will be used.
Possible values are:
-
all- Select all objects in this region. -
me- Select the first player. -
not_me- Select everything except for the first player. -
none- Select nothing. -
players- Select all players. -
room- Select all objects in the room.
filter* - A filter that excludes some objects from the selection. Filters are split into three parts: a filter name, operator, and value.
Possible filter names are:
-
alive- Only keeps creatures that are alive. No operators or values are allowed. -
dead- Only keeps creatures that are dead. No operators or values are allowed. -
distance/dist- Only keeps creatures whose distance from the target position match the given operator and value. All operators are supported, and the value must be a number. -
type- Only keeps creatures or objects whose type matches the given operation and value. The operations=and!=are supported, and the value must be an entry inAbstractPhysicalObject.AbstractObjectTypeorCreatureTemplate.Type.
Possible filter operators are:
-
=- The two operands must be equal. -
!=- The two operands must not be equal. -
<- The first operand must be less than the second. -
>- The first operand must be greater than the second. -
<=- The first operand must be less than or equal to the second. -
>=- The first operand must be greater than or equal to the second.
destroy me - Removes the first player from the game.
move 0 100 room,type=Rock,distance<200 - Flings all rocks within 10 tiles of the target position into the air.
kill type=Vulture - Kills all vultures in the region.