# InstructionModule

The `InstructionModule` class enables effects to provide instructions to the user.

## Example

```
//==============================================================================
// The following example demonstrates how to hide an instruction when more than
// one face is detected and show it if not.
//
// Project setup:
// - Set the 'Max Faces' of the 'Face Tracking' capability to 2 or more
// - Add the 'Instructions' capability
// - Select 'Custom Instructions'
// - Add the 'Try it with friends' instruction
//==============================================================================

// Load in the required modules
const Instruction = require('Instruction');
const FaceTracking = require('FaceTracking');

// Define a boolean that will be true until 2 faces are detected
var show = FaceTracking.count.lt(2);

// Bind the visibility of the instruction to the boolean
Instruction.bind(show, 'try_with_friends');
```

## Properties

| Property                       | Description                                                                                                                                              |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `automaticInstructionsEnabled` | <p><code>(get) automaticInstructionsEnabled: boolean (set) (Not Available)</code></p><p>Specifies whether or not automatic instructions are enabled.</p> |

## Methods

| Method | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `bind` | <p><code>bind(enabled: BooleanSignal, token: StringSignal): void</code></p><p>When enabled, shows instruction for given token (you can find and select custom instruction tokens in project capabilities)</p><p>To hide instruction simply set enabled to <code>false</code>.</p><p>You can have at most one binding for instructions, meaning that setting a different binding would replace any previously created and setup binding for instructions.</p> |

## Classes

This module exposes no classes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sparkar-community.gitbook.io/docs/instructionmodule.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
