Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Working with custom functions

Matei Adriel edited this page May 7, 2020 · 1 revision

Creating custom functions

There are multiple ways of creating a custom function.

  1. The most intuitive way is to go on the explorer panel and click the add icon then type the name of the function.
  2. In case you like to use your keyboard as much as possible you can press S to focus on the search nodes bar, then type the name of your function and press ctrl + shift + space to create the function.

Switching to a custom functions

Switching to editing a custom function is really easy. You can either:

  1. Go on the explorer tab and click the name of your function
  2. Find your custom node in the add tab and click the edit icon
  3. Use S to focus on the node search input, type in the name of your function and then click ctrl + space to start editing it

Taking arguments

A function wouldn't really be a function without arguments. While editing a custom function you can add arguments by either:

  1. Pressing ctrl + i
  2. Clicking the "Create input` button on the add panel

An averege function

  1. Create a custom function called averege following any of the methods described above. You should now see something like: empty

  2. Add the necessary nodes. We will need:

    • 2 inputs
    • An add node to add the inputs
    • A divide node to half the sum
    • A number node to specify what to divide the sum by
  3. Connect the nodes so you have something like this: averege

How to use a custom function

To use a custom function just add it inside another function as you would do with any node. For example this is how to use the above averege function:

averege usage