> For the complete documentation index, see [llms.txt](https://unity.zoeimmersive.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unity.zoeimmersive.com/adding-interactivity/interactions/conditions/duration-parameter.md).

# Duration (parameter)

**Duration** is an option available for almost all conditions, allowing to set a "wait time" until the corresponding condition becomes valid (instead of becoming valid instantly).&#x20;

{% embed url="<https://youtu.be/0xPFjjTUCjA?si=DoeGxgXXaRKM74e3>" %}

If you set up a `minimum duration required` it means that the given condition needs to remain true for this amount of time in order for the condition to be considered valid.

Example: the user needs to look at an object for at least 2 seconds in order for a door to open.

{% hint style="info" %}
*If you have multiple objects in your condition, then the duration time is required for each one of them in order to validate the condition.*
{% endhint %}

**If condition turns false:** here you decide what happens if during the duration time the condition turns false.

* **Reset count:** the count is reset to 0.
* **Keep Progress:** The amount of time the condition remained valid is kept in memory and if condition is true again then it accumulates until it reaches the duration time.
* **Decrease progressively:** the count decreases progressively with a speed factor.

These options are useful for game mechanics where you want the user to fulfill something for at least a given amount of time to progress/win. If the user does not, then you decide if the progress is kept in memory or not.
