Skip to main content
Version: 5.x

Nodes > Math > Relational > Switch

Switch

Returns a Case value based on the passed in Switch index. For example, a Switch value of 1 results in Value for Case 1 being returned. If the Switch value does not match any active Case index, the Default value is returned.

Inputs

NameTypeDescription
SwitchfloatIndex of the Case value to use
Value ( Switch == 0 )floatValue used when Switch is 0
Value ( Switch == 1 )floatValue used when Switch is 1
Value ( Switch == 2 )floatValue used when Switch is 2
DefaultfloatValue used when Switch does not match any active Case

Outputs

NameTypeDescription
ResultfloatCase Value based on Switch

Properties

NameTypeDescription
CountdropdownNumber of cases to expose
TitlestringLabel for Case 0
TitlestringLabel for Case 1
TitlestringLabel for Case 2
Was this page helpful?
Yes
No