> For the complete documentation index, see [llms.txt](https://fast-studios.gitbook.io/press-e/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fast-studios.gitbook.io/press-e/manual/scripting/interactable/interactable.maxinteractions.md).

# Interactable.maxInteractions

<mark style="color:blue;">public int</mark> <mark style="color:$primary;">maxInteractions</mark>;

Maximum number of interactions allowed for this object.\
The system compares this value with `interactionTimes` (which counts each time an interaction happens).

* If `interactionTimes < maxInteractions`  than interaction is allowed.
* Otherwise, interaction is **blocked**.

```csharp
public void ReEnableInteractions(Interactable interactable)
{
    if (interactable.interactionTimes >= interactable.maxInteractions)
    {
        interactable.interactionTimes = 0;
    }
    
    // Now, whenever we call this method and the player has already
    // used all available interactions, it resets the interaction count
    // for this object.
}
```
