Reduced Value (Expression) — Skript

Addon: Skript · Category: Expression · Since: 2.15

Syntax

[the] reduced value

Description

Returns the current accumulated/reduced value within a <a href='#ExprReduce'>reduce expression</a>. This represents the result of all previous reduction operations. Can only be used inside the reduce expression's operation block.

Examples

set {_sum} to {_numbers::*} reduced with [reduced value + input]
set {_max} to {_values::*} reduced with [reduced value if reduced value > input else input]
set {_combined} to {_items::*} reduced with ("%reduced value%, %input%")

View source