K
Docs
API ReferencePiecesRandom Pick
🎲

Random Pick

base.randomBase SetUtility

Reaches into a bag and pulls out one random item. Great for random jokes, quotes, prizes, challenge assignments, or anything where variety is the spice of life.

When to use this
  • Separate items with commas, or put each on a new line
  • The result becomes a ✨ Spark you can drop anywhere in the flow

On the canvas

This is what Random Pick looks like when you place it on your flow. Each field below is something you configure in the inspector panel.

🎲
Random Pick
base.random
Utility
itemsrequired
apple, banana, cherry or one per line
asrequired
picked (becomes a Spark!)

Config fields

FieldTypeReqWhat it does
items
apple, banana, cherry or one per line
textareayesItems to pick from 🎩
as
picked (becomes a Spark!)
textyesName the result ✨

Sparks this piece adds

After this piece runs, these values are available as sparks in every node downstream.

{{pick}}stringRandomly picked value

Output ports

outputMoves on with the random pick available as a Spark
📐

In TypeScript, this would be…

Not something you need to write — just a look at what Kitcord does for you.

TypeScript
const items = ["apple", "banana", "cherry"];
const picked = items[Math.floor(Math.random() * items.length)];
// {{pick}}