Dialog
Creates NPC billboard-style dialog bubbles.
Memory category | Instances |
---|
Member index 14
Description
The Dialog object allows users to create non-player characters (NPCs) that players can talk to using a list of choices. The Dialog object can be inserted into a part such as a Humanoid's head, and then a player will see a speech bubble above the part that they can click on to start a conversation. The creator of a place can choose what choices the player can say by inserting DialogChoice objects into the dialog.
History 51
- 648 Change ReturnType of GetCurrentPlayers from Objects to Instances
- 573 Change ReturnType of SignalDialogChoiceSelected from void to null
- 573 Change ReturnType of SetPlayerIsUsing from void to null
- 553 Change Default of TriggerOffset from to Vector3(0, 0, 0)
- 553 Change Default of TriggerDistance from to 0
- 553 Change Default of Tone from to Neutral
- 553 Change Default of Purpose from to Help
- 553 Change Default of InUse from to false
- 553 Change Default of GoodbyeChoiceActive from to true
- 553 Change Default of ConversationDistance from to 25
- 553 Change Default of BehaviorType from to SinglePlayer
- 486 Change ThreadSafety of TriggerOffset from ReadOnly to ReadSafe
- 486 Change ThreadSafety of TriggerDistance from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Tone from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Purpose from ReadOnly to ReadSafe
- 486 Change ThreadSafety of InitialPrompt from ReadOnly to ReadSafe
- 486 Change ThreadSafety of InUse from ReadOnly to ReadSafe
- 486 Change ThreadSafety of GoodbyeDialog from ReadOnly to ReadSafe
- 486 Change ThreadSafety of GoodbyeChoiceActive from ReadOnly to ReadSafe
- 486 Change ThreadSafety of ConversationDistance from ReadOnly to ReadSafe
- 486 Change ThreadSafety of BehaviorType from ReadOnly to ReadSafe
- 462 Change ThreadSafety of DialogChoiceSelected from to Unsafe
- 462 Change ThreadSafety of SignalDialogChoiceSelected from to Unsafe
- 462 Change ThreadSafety of SetPlayerIsUsing from to Unsafe
- 462 Change ThreadSafety of GetCurrentPlayers from to Unsafe
- 462 Change ThreadSafety of TriggerOffset from to ReadOnly
- 462 Change ThreadSafety of TriggerDistance from to ReadOnly
- 462 Change ThreadSafety of Tone from to ReadOnly
- 462 Change ThreadSafety of Purpose from to ReadOnly
- 462 Change ThreadSafety of InitialPrompt from to ReadOnly
- 462 Change ThreadSafety of InUse from to ReadOnly
- 462 Change ThreadSafety of GoodbyeDialog from to ReadOnly
- 462 Change ThreadSafety of GoodbyeChoiceActive from to ReadOnly
- 462 Change ThreadSafety of ConversationDistance from to ReadOnly
- 462 Change ThreadSafety of BehaviorType from to ReadOnly
- 290 Add TriggerOffset
- 290 Add TriggerDistance
- 281 Add SetPlayerIsUsing
- 281 Add GetCurrentPlayers
- 281 Add BehaviorType
- 263 Add GoodbyeChoiceActive
- 206 Add GoodbyeDialog
- 55 Change Tags of Dialog from [preliminary] to []
- 47 Add DialogChoiceSelected
- 47 Add SignalDialogChoiceSelected
- 47 Add Tone
- 47 Add Purpose
- 47 Add InitialPrompt
- 47 Add InUse
- 47 Add ConversationDistance
- 47 Add Dialog
Members 14
BehaviorType
Type | Default | |
---|---|---|
DialogBehaviorType | SinglePlayer |
The BehaviorType of a Dialog determines whether multiple players can interact with a dialog at once. The default value for this property is SinglePlayer.
SinglePlayer
When a Dialog is configured to SinglePlayer, only one player can interact with it at a time. As soon as a player engages with a dialog, other players will not be able to initiate the dialog until the first player is finished.
While a player is engaged with a dialog, the other players will see the dialog choices of the player who started the dialog, along with the responses.
MultiplePlayers
When a Dialog is set to MultiplePlayers, any player can initiate a dialog at any time, even if another player has already initiated the dialog. Unlike SinglePlayer however, Dialogs set to MultiplePlayers will not show the dialog choices and responses to anyone but the player in the conversation.
1 2 3 4 5 6 7 8 9 10 11 |
|
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
History 4
- 553 Change Default of BehaviorType from to SinglePlayer
- 486 Change ThreadSafety of BehaviorType from ReadOnly to ReadSafe
- 462 Change ThreadSafety of BehaviorType from to ReadOnly
- 281 Add BehaviorType
ConversationDistance
Type | Default | |
---|---|---|
float | 25 |
The furthest distance that a player can be from the Dialog's parent to start a conversation.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
History 4
- 553 Change Default of ConversationDistance from to 25
- 486 Change ThreadSafety of ConversationDistance from ReadOnly to ReadSafe
- 462 Change ThreadSafety of ConversationDistance from to ReadOnly
- 47 Add ConversationDistance
DialogChoiceSelected
Parameters (2) | |
---|---|
player | Instance |
dialogChoice | Instance |
Fired when a player chooses something to say, through a Dialog instance.
This event is client-side only and will not fire on the server. It should be connected to in either a LocalScript or a ModuleScript required by a LocalScript.
Thread safety | Unsafe |
---|
History 2
- 462 Change ThreadSafety of DialogChoiceSelected from to Unsafe
- 47 Add DialogChoiceSelected
GetCurrentPlayers
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
Instances |
The GetCurrentPlayers function of a Dialog will return a list of Player currently using the Dialog. If there are no players using the dialog then the returned list will be empty.
Thread safety | Unsafe |
---|
History 3
- 648 Change ReturnType of GetCurrentPlayers from Objects to Instances
- 462 Change ThreadSafety of GetCurrentPlayers from to Unsafe
- 281 Add GetCurrentPlayers
GoodbyeChoiceActive
Type | Default | |
---|---|---|
bool | true |
Toggles whether the goodbye option will be displayed. If true, the dialog will display the content of Dialog.GoodbyeDialog as the last option after other dialog choices. Clicking on the goodbye option will exit the dialog.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
History 4
- 553 Change Default of GoodbyeChoiceActive from to true
- 486 Change ThreadSafety of GoodbyeChoiceActive from ReadOnly to ReadSafe
- 462 Change ThreadSafety of GoodbyeChoiceActive from to ReadOnly
- 263 Add GoodbyeChoiceActive
GoodbyeDialog
Type | Default | |
---|---|---|
string |
Sets the sentence that the dialog will show to the player when the chat ends
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
History 3
- 486 Change ThreadSafety of GoodbyeDialog from ReadOnly to ReadSafe
- 462 Change ThreadSafety of GoodbyeDialog from to ReadOnly
- 206 Add GoodbyeDialog
InUse
Type | Default | |
---|---|---|
bool | false |
If true, this dialog is being used by at least one player.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | false |
InitialPrompt
Type | Default | |
---|---|---|
string |
Sets the first sentence that the dialog will show to the player, once a chat is commenced.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
History 3
- 486 Change ThreadSafety of InitialPrompt from ReadOnly to ReadSafe
- 462 Change ThreadSafety of InitialPrompt from to ReadOnly
- 47 Add InitialPrompt
Purpose
Type | Default | |
---|---|---|
DialogPurpose | Help |
Sets the icon that the initial dialog displays.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
SetPlayerIsUsing
Parameters (2) | ||
---|---|---|
player | Instance | |
isUsing | bool | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 573 Change ReturnType of SetPlayerIsUsing from void to null
- 462 Change ThreadSafety of SetPlayerIsUsing from to Unsafe
- 281 Add SetPlayerIsUsing
SignalDialogChoiceSelected
Parameters (2) | ||
---|---|---|
player | Instance | |
dialogChoice | Instance | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 573 Change ReturnType of SignalDialogChoiceSelected from void to null
- 462 Change ThreadSafety of SignalDialogChoiceSelected from to Unsafe
- 47 Add SignalDialogChoiceSelected
Tone
Type | Default | |
---|---|---|
DialogTone | Neutral |
Sets the color of the NPC's speech bubble.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
TriggerDistance
Type | Default | |
---|---|---|
float | 0 |
Sets the maximum distance that a dialog can be triggered from.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
History 4
- 553 Change Default of TriggerDistance from to 0
- 486 Change ThreadSafety of TriggerDistance from ReadOnly to ReadSafe
- 462 Change ThreadSafety of TriggerDistance from to ReadOnly
- 290 Add TriggerDistance
TriggerOffset
Type | Default | |
---|---|---|
Vector3 | 0, 0, 0 |
Sets the offset of the dialog relative to the dialog's parent.
Thread safety | ReadSafe |
---|---|
Category | Data |
Loaded/Saved | true |
History 4
- 553 Change Default of TriggerOffset from to Vector3(0, 0, 0)
- 486 Change ThreadSafety of TriggerOffset from ReadOnly to ReadSafe
- 462 Change ThreadSafety of TriggerOffset from to ReadOnly
- 290 Add TriggerOffset