> For the complete documentation index, see [llms.txt](https://xeavin.gitbook.io/the-insurgents-handbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xeavin.gitbook.io/the-insurgents-handbook/scripts/vm-call-targets/a-ask-1ff.md).

# A Ask 1FF

### Signature

```c
void aask_1ff(int windowId, int dialogId, int posX, int posY, int alignType, int windowType); //id:0x01ff
```

### Description

Displays a window with a message that asks the player to make a choice. The execution of the following functions is stopped until a choice was made. Once it was, the chosen item number will be returned. If the chosen item was part of a **Numbox** text tag, its macro parameter set via the [Set Mes Macro](/the-insurgents-handbook/scripts/vm-call-targets/set-mes-macro.md) function will be returned instead.

If the window type is a **System Window**, the window will close itself after a choice was made.

If it's a **Dialogue Window**, the window must be manually closed by using either the [Mes Sync](/the-insurgents-handbook/scripts/vm-call-targets/mes-sync.md) or [Mes Sync 2](/the-insurgents-handbook/scripts/vm-call-targets/mes-sync-2.md) function after this one. As an alternative, you can also use the [Mes Close](/the-insurgents-handbook/scripts/vm-call-targets/mes-close.md) and [Mes Close Sync](/the-insurgents-handbook/scripts/vm-call-targets/mes-close-sync.md) functions one after another.

The author of the message is the current script and can be referenced in the dialogue via the `{name}` text tag.

### Arguments

#### Window Identifier

The window the dialogue will be displayed in.

There are a total of 8 windows (0 -> 7) that can be used to simultaneously display several dialogues, shapes (textures), etc. at the same time.

If a value of `-1` is passed, it will be changed to `0`.

If the window is already used before calling this function, it will overwrite the properties of the current one, but only if it wasn't a message with a choice.

#### Dialog Identifier

The id of the dialogue that will be displayed.

Usually, it's OR'ed by `0x01000000` before passing it as an argument. However, this is not necessary and probably just a leftover from the dev tools used to automate the process of the dialogue selection.

If the dialogue is empty or does not ask the user to make a choice via the text tags `{choice}` or `{numbox}`, no window will be opened. In this case, the return value will be `0`.

#### Position X

The position of the dialogue window on the x-axis.

#### Position Y

The position of the dialogue window on the y-axis.

#### Alignment Type

Controls the window's alignment.

There are a total of 5 alignment types (0 -> 4) that can be used to align the window to a different position on the screen. The position differs based on the position x and y arguments.

#### Window Type

The type of window the dialogue will be displayed in.

There are a total of 21 window types (-5 -> 15) that can be used to display a message in a different style.

Here is a list of which window types are commonly used.

<table><thead><tr><th width="100.33333333333331">Type</th><th width="278">Name</th><th>Description</th></tr></thead><tbody><tr><td>-5</td><td>Combat Log</td><td>A window that looks like a combat log.</td></tr><tr><td>-4</td><td>Tutorial Header</td><td>A window with a tutorial text and line in the header.</td></tr><tr><td>-1</td><td>Dialog Window</td><td>A window that is commonly used when talking to a character.</td></tr><tr><td>0</td><td>System Window (No Border)</td><td>A window with no border, commonly used for system messages.</td></tr><tr><td>1</td><td>System Window (Blue Border)</td><td>A window with a blue border.</td></tr><tr><td>12</td><td>System Window (Brown Border)</td><td>A window with a brown border.</td></tr></tbody></table>

The following window types ignore the position arguments:

* Combat Log
* Tutorial Header
* Dialog Window

## Notes

{% hint style="danger" %}
The window types: **Combat Log** and **Tutorial Header** will always cause a crash.
{% endhint %}

{% hint style="warning" %}
The window type: **System Window (Brown Border)** is bugged as it doesn't allow interacting with the window at all.
{% endhint %}

{% hint style="info" %}
Unlike the [Mes](/the-insurgents-handbook/scripts/vm-call-targets/mes.md) function, there is no way to manually set the width and height of the dialog window.

There is also technically no need to disable the user control with the [Mes Sync](/the-insurgents-handbook/scripts/vm-call-targets/mes-sync.md), [Mes Sync 2](/the-insurgents-handbook/scripts/vm-call-targets/mes-sync-2.md) or [Uc Off](/the-insurgents-handbook/scripts/vm-call-targets/uc-off.md) function as you can still interact with dialog window regardless. However, I would still recommend using it for consistency.
{% endhint %}

{% hint style="info" %}
Entering a new location will close all open windows.
{% endhint %}
