# Notifications

A notification may be useful to let the user notice something. You could also use it as an achievement system for your game.

First you need to declare your notification, it consists on an Identifier, Title, a A subtitle and the message body.

```javascript
var notifications = {
    "SampleNotification":{
        title: "Hey!",
        body: "This is a notification",
        icon: "img/logo.png"
    },
}
```

Next, to show them up in your game, yo just need the notify command.

```javascript
"notify SampleNotification"
```

If you want your notification to hide after a while, you can tell after how many miliseconds it should go away:

```javascript
"notify SampleNotification 300"
```

That way, the notification will pop up and then go away after the 300 miliseconds have passed.


---

# 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://developers.monogatari.io/documentation/1.3.0/script/notifications.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.
