This AI is still in early stages of development.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Extend the "Time to Live" of a conversation.

 

Syntax

chat.extend(player, ttl);

Parameters

ParameterTypeMandatoryNotesChat Ver
playerNumber(tick)

The ID of the player whose conversation will be extended.

0.1
ttlNumber(error)

Time To Live (TTL) specified in milliseconds.

Default: 15000

0.1

Return Values

ValueTypeNotesChat Ver
<error>ErrorParameters specified were invalid (see error message for details).0.1
<conversation>Object

An object describing the conversation with the following properties:

  • fn– the conversation handler function
  • timeout– the real-world time (in ms) when the conversation will expire

The same object is used throughout a game session (does not survive the save/load cycle) so you can use it to store custom properties relating to conversations. Just remember to re-initialise any properties whenever a conversation starts.

0.1

Example

Extend conversation with player 4
// conversation with player 4 will be extended for 15 seconds from current time
chat.extend(4);
Availability BETA

Requires:

Contents

Jump to:

Chat API

Topics:

 

  • No labels