# Idle

## Overview

The Idle State is the most basic state on the controller.  Its State [**ID** ](/animal-controller/scriptable-architecture/scriptables/scriptable-ids.md#states-ids)is **0. It** allows the animal to stay idling in a single position.&#x20;

Idle is the only state that does not require any further configuration. It has no custom parameters.

## How it works

This works as the base state, when the animal is idling. Doing nothing

To give more personality to the character you can have more than one Idle animation and randomize playing them using the Random Behaviour on the Animator Controller.

![](/files/-MkXd2gMbGrwTJ5_yECR)

## Creating the State

To create a new **Idle** State Click the Plus button on the States list  and add the **Idle**

Or duplicate any of the already created States asset of any animal you own and drag it to the States List.

![](/files/R2S6nIAoWn0JEvaIjIXv)

## Priority

It has the lowest priority of all states and it should always be at the bottom of the list.

All Higher states can be activated.&#x20;

## Requirement

The Idle State does not require extra gameobjects, pivots or internal animal configuration. Just an animation or animations to be used as Idles.

## Activation Condition

This state is Activated automatically when there's no Movement registered on the Animal Controller.

You can always Force its activation via code.

`Animal.State_Force(0)`  or `Animal.State_Force(StateEnum.Idle)`

## Exit Conditions

Through code the exits conditions will be executed to check if the State can exit. In the case of this state the **conditions** are:

* Movement on the Animal is being registered. MAnimal.MovementAxis != Vector3.zero

## Animator

The Idle state requires animation states in charge of the Idle Logic.

### Idle Sub-State Machine

The Sub-State Machine \[Idle] will hold all the Idle Animations.

Its entering transition conditions are:

![](/files/tJ6J59Zg61x1IdhNyuto)

The Idle Substate machine is the only Subtate machine that needs a transition to itself:

![](/files/2uV8BP0rndi37jR4g4tl)

This allows the idles animations inside the state to exit and then come back to the next Idle Animation.

### Core Animations

All States have a core animation, on which the animal will play while the state is active. In case of Idle, all idle animations are core animations.

The core animations must be always tagged just like the Name of the State ID.&#x20;

&#x20;

![](/files/24Bn1A7mnVTSIOquW77F)

### Exit Transitions

The Idle State is the only one that needs exit transition

![](/files/41zu4ctCZNWuTTn0eX3M)

To play random Idle Animations you need to add the Random Behaviour to the Idle SubState Machine and then set the entry transitions to different random values within the Random Behaviour Range Value:

![](/files/104o1tHQ3tuDrDUxn2Ij)

Using Higher Range values on the Random Behaviour with just a few animations, it will give more priority to some animations more than other.

In the Image example.&#x20;

* \[Idle] will be played more if the Random value is between (0 - 6)
* \[Idle Look] will be played if Random is = 7
* \[Idle Look Opp] will be played if Random is = 8

So \[Idle] will be played more often.

&#x20;


---

# 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://malbersanimations.gitbook.io/animal-controller/main-components/manimal-controller/states/idle.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.
