> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dotouch-emu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# hasControl

> Vérifie si le joueur contrôle actuellement le compagnon.

Vérifie si le joueur contrôle actuellement le compagnon.

#### 🎮 Méthode

```lua theme={null}
companion:hasControl()
```

#### 💎 Valeur de retour

| Type      | Description                                                                         |
| --------- | ----------------------------------------------------------------------------------- |
| `boolean` | `true` si le joueur contrôle le compagnon, `false` si l'IA du compagnon est active. |

#### 💡 Exemple

```lua theme={null}
if companion:hasControl() then
  global:printMessage("Le joueur contrôle le compagnon")
end
```
