Get 1Click Maker

Activate Function โ€‹

Activate Function
PRO 30 memory Flow & Logic

Run another function, so shared logic lives in one place.

Runs another function at this point, then continues with the next action. This is how you call helper functions.

Fields โ€‹

FieldRequiredWhat to enter
FunctionYesAny function of the project except condition branches: helpers, button functions, event functions.

Notes โ€‹

  • The called function runs completely before the caller continues (unless it hits a Timer, which lets the caller continue and resumes the callee later).
  • You can call a button function from another button; the button prim does not need to be clicked.
  • Calling an event function from a button is a good way to test event logic.
  • A function that calls itself (directly or via another) loops. Use a Timer inside the loop and a condition to exit.
  • Cost: 30 units per call, versus repeating the actions.

Example โ€‹

text
fx_click (helper): Sound "click" 40 ยท Glow $THIS 0.2 ยท Timer 0.2 ยท Glow $THIS 0

btn_red   โ†’ Activate Function โ†’ fx_click ยท Color Shirt <1,0,0>
btn_blue  โ†’ Activate Function โ†’ fx_click ยท Color Shirt <0,0,1>