Note This is a web-version of a tutorial chapter embedded right into the XOD IDE. To get a better learning experience we recommend to install the desktop IDE or start the browser-based IDE, and you’ll see the same tutorial there.

Variadic Nodes

Screenshot of 008-variadics

Check out the or node on this patch. In the previous lesson we saw that it has just two inputs, but now it has four! That’s because some of the nodes in XOD are variadic — you can change their number of inputs.

Variadic nodes can be recognized by the handle on the right side. Also, their pins are marked as “variadic” in the help panels.

Exercise #

Let’s learn how to adjust the number of inputs.

  1. Hover over the right side of the add node. Your cursor should become a double arrow.
  2. Click and drag to the right to add more inputs.
  3. Use the new inputs to link the “11” tweak-number, bind some values to others.

As you guess, add will sum all the inputs it got. Run the simulation to verify.

Found a typo or mistake? Want to improve the text? Edit this page on GitHub and open a pull request. If you have a complex proposal or you want to discuss the content, feel free to start a new thread on XOD forum.