Tutorials / Advanced

Using variables and conditions

Available now

Declare run variables, apply choice effects and build Available when conditions in Studio.

On this page

Unlock a later choice in this run

  1. In Studio, select Project / variables. Enter a valid New variable ID (for example foundFlag), choose + Add boolean variable, and set Initial value to False.
  2. Select a Decision. Under one choice’s On choosing this option, use + Set run variable, select foundFlag and set Set to True. This effect runs only when the choice is confirmed.
  3. Under a later Decision’s choice, set Available when to Variable equals (this run), select foundFlag and set Equals to True. Under When unavailable, choose Hidden, Locked or Mystery; all three are presentation, not secrecy.
  4. Connect every playable route to an Ending. Expand issues and correct unresolved references. In preview, choose Run / restart current draft from Start; try a route with and without the earlier choice. Variables reset on new runs.

Expected result: the later choice becomes available only after foundFlag is set. To accumulate numbers and route automatically, follow the score/Router tutorial. Conditions reference.

Back to all tutorials