---
url: /api/kiln/functions/onEnter.md
---
[Kiln API](../../index.md) / [kiln](../index.md) / onEnter

# Function: onEnter()

```ts
function onEnter<S>(s, value): Condition;
```

Run condition: true on the first frame after `value` is entered (in Fixed: the first fixed step).
The initial value counts as entered on frame 1. For Update, Fixed and Late; Startup runs before it.

## Type Parameters

| Type Parameter |
| ------ |
| `S` *extends* `string` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `s` | [`State`](../interfaces/State.md)<`S`> |
| `value` | `S` |

## Returns

[`Condition`](../type-aliases/Condition.md)
