Filter (Section) — Skript

Addon: Skript · Category: Section · Since: 2.10

Syntax

filter %~objects% to match [any|all]

Description

Filters a variable list based on the supplied conditions. Unlike the filter expression, this effect maintains the indices of the filtered list. It also supports filtering based on meeting any of the given criteria, rather than all, like multi-line if statements.

Examples

set {_a::*} to integers between -10 and 10
filter {_a::*} to match:
	input is a number
	mod(input, 2) = 0
	input > 0
send {_a::*} # sends 2, 4, 6, 8, and 10

View source