Get 1Click Maker

Creating a Condition ​

Condition
FREE 40 memory Flow & Logic

Compare two values and run one set of actions when true, another when false.

Requires [add-on] - Conditions & Variables - 1Click inside the object that runs the action.

Fields ​

FieldRequiredWhat to enter
FieldYesThe first value. Type a literal, or $ / ! to autocomplete a variable. Up to 70 characters.
OperatorYesOne of ==, !=, >, <, >=, <=. See Conditions.
ValueYesThe second value. Same rules as Field.

The success and failure branches are not fields in the form: they are two buttons on the saved condition's card (next step).

The Condition form.
The Condition form.

Steps ​

  1. Create the variable(s) you will compare (Creating a Variable) if you have not yet.

  2. Open the button's function and pick Condition in the action grid.

  3. Fill Field, Operator and Value. Typing $ or ! opens the variable list.

  4. Save. The condition card now shows two buttons: Success and Failure.

  5. Click Success. The panel creates the branch (a hidden function named cond_…) and opens it; add the actions that should run when the comparison is true. Go back and do the same for Failure. A branch you never open simply does nothing.

  6. Drop [add-on] - Conditions & Variables - 1Click into the HUD if it is not there, Save, Build, test.

Worked example: toggle ​

Variable $state (string) with initial value OFF.

text
Button "power"
└─ Condition: $state == OFF
   β”œβ”€ success β†’ Change Variable $state = ON Β· Glow $THIS 0.3
   └─ failure β†’ Change Variable $state = OFF Β· Glow $THIS 0.0

First click: $state is OFF, success runs, glow on, state becomes ON. Second click: failure runs, glow off, state back to OFF. Full guide: ON/OFF Toggle Button.

Worked example: owner check ​

text
Button "admin"
└─ Condition: !touched_key == !owner_key
   β”œβ”€ success β†’ Open URL, Give Items…
   └─ failure β†’ Message: "Owner only"

Nesting ​

Put a Condition inside a branch function to chain checks:

text
Condition A: !touched_key == !owner_key
└─ success branch
   └─ Condition B: !touched_face == 0
      β”œβ”€ success β†’ actions for the top face
      └─ failure β†’ actions for the other faces

Common mistakes ​

  • Comparing $state with on when the variable holds ON. Case matters.
  • Forgetting the $: state == OFF compares the text "state" with "OFF", always false.
  • Comparing a string variable with a number.
  • Testing right after a Change Variable without a short Timer in between (see Change Variable).
  • Missing add-on: the object says it needs [add-on] - Conditions & Variables - 1Click.