Studio Yotsuba
Back to Node List

Value Select

value_select

Selects one value from multiple same-type inputs by index

Reviewed
Guide available

Input Ports

NameTypeDescription
Item 0
item_0
Number
Selectable value 0
Item 1
item_1
Number
Selectable value 1
Item 2
item_2
Number
Selectable value 2
Item 3
item_3
Number
Selectable value 3

Output Ports

NameTypeDescription
Value
value
Number
Selected value

Parameters

NameTypeDefaultRangeDescription / Options
Value Type
value_type
Enum
Number—

Choose which type of values this selector should pass through

  • NumberNumber
    Pass Number values through this node
  • FloatFloat
    Pass Float values through this node
  • IntInt
    Pass Int values through this node
  • BoolBool
    Pass Bool values through this node
  • ColorColor
    Pass Color values through this node
  • TextText
    Pass Text values through this node
  • ImageImage
    Pass Image values through this node
  • PathPath
    Pass Path values through this node
  • PixelLinePixelLine
    Pass PixelLine values through this node
  • Vec2Vec2
    Pass Vec2 values through this node
  • Vec3Vec3
    Pass Vec3 values through this node
  • OklchAdjustOklchAdjust
    Pass OklchAdjust values through this node
  • PalettePalette
    Pass Palette values through this node
  • ListList
    Pass List values through this node
  • MapMap
    Pass Map values through this node
  • TextLayoutTextLayout
    Pass TextLayout values through this node
  • PixelPatchPixelPatch
    Pass PixelPatch values through this node
  • RecordedLayerRecordedLayer
    Pass RecordedLayer values through this node
  • AnimationClipAnimationClip
    Pass AnimationClip values through this node
  • AsepriteFileAsepriteFile
    Pass AsepriteFile values through this node
  • RuleGridSpecRuleGridSpec
    Pass RuleGridSpec values through this node
  • RuleTileSetRuleTileSet
    Pass RuleTileSet values through this node
  • RuleTileAssetRuleTileAsset
    Pass RuleTileAsset values through this node
  • RuleSetRuleSet
    Pass RuleSet values through this node
  • RuleCanvasRuleCanvas
    Pass RuleCanvas values through this node
  • RuleResolvedRuleResolved
    Pass RuleResolved values through this node
  • RuleTileAtlasRuleTileAtlas
    Pass RuleTileAtlas values through this node
  • NineSliceNineSlice
    Pass NineSlice values through this node
  • FxState2DFxState2D
    Pass FxState2D values through this node
  • SpriteSheetSpriteSheet
    Pass SpriteSheet values through this node
  • VariantSnapshotVariantSnapshot
    Pass VariantSnapshot values through this node
  • VariantRecipeVariantRecipe
    Pass VariantRecipe values through this node
  • VariantRecordVariantRecord
    Pass VariantRecord values through this node
  • IsoItemIsoItem
    Pass IsoItem values through this node
  • IsoSceneIsoScene
    Pass IsoScene values through this node
  • IsoWorldIsoWorld
    Pass IsoWorld values through this node
  • TileAssetTileAsset
    Pass TileAsset values through this node
  • TilePaletteTilePalette
    Pass TilePalette values through this node
  • TileCanvasTileCanvas
    Pass TileCanvas values through this node
  • TileResolvedTileResolved
    Pass TileResolved values through this node
  • AnyAny
    Advanced: allow any value type. Downstream nodes may fail if the value type does not match what they expect.
Count
count
Int
41–16

Number of input slots

Index
index
Int
00–15

Selected input index. Values outside the active slot range are clamped.

What is it for?

  • Selecting one created image variant to pass downstream
  • Switching color, number, palette, and other candidates by index
  • Promoting index to an input pin and switching candidates over time from a numeric node

Overview

An N-way switch that selects one of several candidates by number. It extends the two-way switch and is useful for choosing image variants or stepping through discrete options.

Usage tips

  • Manual selection is the basic pattern: arrange candidates and compare them with index, such as alternative colors or shapes.
  • Promote index to an input pin 📌 and connect an integer waveform or counter to animate through candidates in order. If the input is fractional, convert it to an integer first with math_func(Floor).
  • For a dynamic or large number of candidates, a list with list_create + list_get scales better. Value Select suits a small set of manually arranged candidates.

Related nodes

  • switch — two choices controlled by a Bool
  • list_get — retrieve by index from a list, the list-based equivalent
  • int_input — externalize the selection index
  • variant_select — selection in a variant workflow

Notes

  • index is zero-based, starting at 0. index = 2 selects item_2.
  • An out-of-range index is clamped to the first or last candidate.
  • If the selected input is unconnected, the node first falls back to item_0. If item_0 is also unconnected, it uses the first connected candidate.
  • Only when no candidates are connected does value become an empty output.
  • Changing value_type also changes the types of candidate inputs and the value output.
  • Normally, connect the same type to every candidate.
  • This is a normal evaluation node. Connected candidate branches are graph dependencies. Unchanged candidates are cached, but this is not a Lazy Select that completely excludes unselected branches from evaluation.
  • Any is for advanced use. A connection may be accepted, but if the selected value does not match the type expected downstream, evaluation produces a warning or node error.

Examples

  1. Select one of four image candidates
    • Set value_type = Image.
    • Connect images to item_0..item_3.
    • Switch the chosen candidate with index.
  2. Switch images over time
    • Promote index to an input pin and connect it from Time Source or a numeric node.
  3. Switch among several color candidates
    • Set value_type = Color.
    • Pass the selected color to a downstream color input.
  4. Switch among palette candidates
    • Set value_type = Palette.
    • Use it to compare appearances with different palettes.
Back to Node List