BuildcordDocs

Run another flow

Hand over to a sub-flow with values, then continue when it finishes.

flow.call runs a sub-flow, gives it values, and carries on with what it hands back.

Settings

SettingWhat it does
FlowThe sub-flow to run. Choose Choose a flow until you pick one.
Give itOne name: value per line, such as amount: {option.amount}. The sub-flow reads each as {input.name}.

Ways out

out, taken when the sub-flow finishes. Turn on If it fails for a red way out.

Produces

{result.name} for each value the sub-flow handed back with Hand back. Running another flow clears the results of the one before.

Notes

  • The sub-flow also sees the same run's values, such as {user.id} and {temp.name}, and what it sets with {temp.name} is seen here afterwards.
  • Its inputs are its own: once it's done, {input.name} here is what this flow was given, if it's a sub-flow too.
  • If the sub-flow pauses, for a button or a wait, this flow carries on without waiting for it.
  • A sub-flow that nothing calls never runs, and the checker warns you.
  • The canvas shows the sub-flow's name.

Example

A Charge sub-flow takes user and amount, takes the amount off their balance, and hands back balance. /buy and /bet both run it and reply with {result.balance}.

On this page