Skip to content

SpeakInteraction ​

Inherits: Interaction < Resource

Simple interaction that displays text and optionally plays a voice line

Properties ​

Stringtext"":
Fontfont
floattext_size40.0
floattext_outline_size14.0
Colortext_colorColor(1.0, 1.0, 1.0, 1.0)
floattext_visual_duration5.0
SFXSelectionvoice_line_sfx
AnimationSelectionSocialanimation
SpeechLine.KindkindSpeechLine.Kind.SAY
intemote_id0
SpeechLine.AudienceaudienceSpeechLine.Audience.TRIGGERER
floatrange_override0.0
inttrigger_area_id0

Variables ​

Label3Ddisplay_text
Timerduration_timer

Methods ​

boolcan_interact( player: Player )
voidstart_interaction( player: Player )
voidend_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