SpeakInteraction ​
Inherits: Interaction < Resource
Simple interaction that displays text and optionally plays a voice line
Properties ​
String | text | "": |
Font | font | |
float | text_size | 40.0 |
float | text_outline_size | 14.0 |
Color | text_color | Color(1.0, 1.0, 1.0, 1.0) |
float | text_visual_duration | 5.0 |
SFXSelection | voice_line_sfx | |
AnimationSelectionSocial | animation | |
SpeechLine.Kind | kind | SpeechLine.Kind.SAY |
int | emote_id | 0 |
SpeechLine.Audience | audience | SpeechLine.Audience.TRIGGERER |
float | range_override | 0.0 |
int | trigger_area_id | 0 |
Variables ​
Label3D | display_text | |
Timer | duration_timer |
Methods ​
bool | can_interact( player: Player ) |
void | start_interaction( player: Player ) |
void | end_interaction() |
Property descriptions ​
String text = "": ​
Text to display on Label3D, it text is empty no label will be used
Font font ​
Text settings
float text_size = 40.0 ​
The size of the text above the NPC.
float text_outline_size = 14.0 ​
The size of the outline of the text.
Color text_color = Color(1.0, 1.0, 1.0, 1.0) ​
The color of the text.
float text_visual_duration = 5.0 ​
Lifetime duration of floating text (If audio is longer it will override)
SFXSelection voice_line_sfx ​
The voice line the entity speaks (a character of the voice lines and a file; it plays on the Voice bus with its subtitle)
AnimationSelectionSocial animation ​
Animation to play on interact
Chat
SpeechLine.Kind kind = SpeechLine.Kind.SAY ​
Say, yell or emote: the channel the text is also written in (the chat box keeps it)
int emote_id = 0 ​
An emote of the library (the id of an Emote) instead of a text of its own. 0 = the text above
SpeechLine.Audience audience = SpeechLine.Audience.TRIGGERER ​
Who reads the line in the chat: by default the player who talked to it
float range_override = 0.0 ​
For Near: how far it is heard, in metres. 0 = the range of the channel
int trigger_area_id = 0 ​
For Trigger area: the trigger area the players have to be in
Variable descriptions ​
Label3D display_text ​
Label3D for text to display in game
Timer duration_timer ​
Timer for the interactions duration
Method descriptions ​
bool can_interact( player: Player ) ​
Override to check if speak interaction is available
void start_interaction( player: Player ) ​
Start the speak interaction
void end_interaction() ​
End the speak interaction