What it does
Sends an action request (move, cast or end turn) to the tactical server, which decides the result.
- 1No target, for example "endTurn".
- 2With a target cell, for example "move".
- 3With a target cell and a spell, for "cast".
Syntax
1
NetIntent(intentType string) → integer2
NetIntent(intentType string, cellX integer, cellY integer) → integer3
NetIntent(intentType string, cellX integer, cellY integer, spellID string) → integerParameters
| Name | Type | In forms | Meaning |
|---|---|---|---|
| intentType | string | all | "move", "cast" or "endTurn". Other values are refused. |
| cellX | integer | 2, 3 | The target cell's column on the grid. Decimals are dropped. |
| cellY | integer | 2, 3 | The target cell's row on the grid. Decimals are dropped. |
| spellID | string | 3 | The id of the spell to cast. |
Every form returns
integer
1 if the request was sent, 0 if the type is empty or unknown, or when not connected or reconnecting.
Good to know
- The server answers with an "intentAccepted" or "intentRejected" event, read through NetPollEvent().
- Join the tactical room first with NetJoinRoom().
- Only available in the aukimi editor: exported games do not provide this command.
Example · generated
Form 1, the short one
DO Print(NetIntent("value")) Sync()LOOPForm 3, with every argument
DO Print(NetIntent("value", 1, 1, "value")) Sync()LOOPNetIntent is called and its answer is printed every frame. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.