- Opcode: 0x04A
- Short name: ASK
- Long name: Ask
Argument
none
Stack
Message Channel
Field message ID
Line of first option
Line of last option
Line of default option
Line of cancel option
ASK
Description
Opens a field message window and lets the player choose a single line. The handler pops six values — message channel, field message ID, the first, last, default and cancel choice-line indices — draws the window and drives a small state machine (state counter at entity+516): it returns 5 (busy) if the channel is in use, 1 (wait) while the question is open, and once the player confirms it stores the chosen line index into the entity result register I[0] (return_value, entity+320), pops all six values and returns 3. Retrieve the answer with PSHI_L 0.
AASK is an upgrade that also lets you set the window position.
PC handler: SCRIPT_ASK.
Function addresses
| Function | Address | Description |
|---|---|---|
SCRIPT_ASK | 0x529520 | Field script opcode handler (verified IDA function) |