Skip to main content
Docs
›
list.add

list.add

List

Adds a picked entry to a list.

Signature

list.add(ref: ElementRef, key: string, item: ContentRef, offer: ContentOffer): void

Parameters

NameTypeRequiredDescription
refElementRefRequiredThe element it works on, usually self.
keystringRequiredThe name of the list.
itemContentRefRequiredThe entry the player picked.
offerContentOfferRequiredThe choices the pick was made from, written inline.

Returns

void Nothing.

Example

list.add(self, "pack", trinket, offer.where({ weight: { lte: 3 } }));