Copy Into Variable (Effect) — Skript

Addon: Skript · Category: Effect · Since: 2.8.0

Syntax

copy %~objects% [in]to %~objects%

Description

Copies objects into a variable. When copying a list over to another list, the source list and its sublists are also copied over. <strong>Note: Copying a value into a variable/list will overwrite the existing data.</strong>

Examples

set {_foo::bar} to 1
set {_foo::sublist::foobar} to "hey"
copy {_foo::*} to {_copy::*}
broadcast indices of {_copy::*} # bar, sublist
broadcast {_copy::bar} # 1
broadcast {_copy::sublist::foobar} # "hey!"

View source