Tutorials / Advanced
Using variables and conditions
Available nowDeclare run variables, apply choice effects and build Available when conditions in Studio.
On this page
Unlock a later choice in this run
- In Studio, select Project / variables. Enter a valid New variable ID (for example
foundFlag), choose + Add boolean variable, and set Initial value to False. - Select a Decision. Under one choice’s On choosing this option, use + Set run variable, select
foundFlagand set Set to True. This effect runs only when the choice is confirmed. - Under a later Decision’s choice, set Available when to Variable equals (this run), select
foundFlagand set Equals to True. Under When unavailable, choose Hidden, Locked or Mystery; all three are presentation, not secrecy. - 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.