Skip to content

Trigger Function

Defines a reusable function that can be called from anywhere using Call Function.

Inputs: None · Outputs: Then

INFO

This node is used to define a function. To call it, use the Call Function node.

Description

The Function node acts as an entry point for reusable logic. Define a function once, then call it from multiple places in the same flow (or from other flows) using the Call Function node.

Settings

SettingTypeRequiredDefaultDescription
EnabledBooleanNotrueEnable or disable this function.
Function NameStringYesA unique name for this function (e.g., myFunction). Must match the name used in Call Function nodes.
DescriptionStringNoA description of what this function does. No effect on functionality.

How It Works

  1. Create a Function node and give it a name (e.g., healPlayer).
  2. Connect the Then output to whatever actions the function should perform.
  3. Elsewhere in your flow, use a Call Function node with the same name to trigger this function's logic.

Example

Define a function called announceJoin:

  1. Set Function Name to announceJoin
  2. Connect Then → Send Message (%player% has joined! to All Players)
  3. From your Event Trigger (Player Joins), add a Call Function with name announceJoin

Tips

  • Functions can accept arguments passed by the Call Function node, accessible via %arg_1%, %arg_2%, etc.
  • Use functions to avoid duplicating the same sequence of nodes in multiple places.
  • Functions only run synchronously for the moment. When calling the function, the code waits for the function to complete before continuing.

Oasis Admin Editor Documentation