ScarDoc

Start typing to search the SCAR reference.

Function
Actor

Actor_PlaySpeech

Plays a speech event for a given actor WITH a portrait and subtitle

On this page
Actor_PlaySpeech(actor, locID, speechbubble, audioCtrlEvent)

Description

If the speech file is not available, a placeholder time will be calculated for the message using the number of words and the message will be displayed for that length of time. speechbubble: Who a speech bubble should appear over ingame. Can be a squadID or an SGroup (where it appears over the first guy in the group) It can also be a table in the format {sgroup = sg_orkboys, closest_to = sg_gorgutz} where it finds the squad in the group closest to the reference point. It can also be in the format {sbp = SBP.ORKS.ORK_BOY, closest_to = mkr_orkIdol} to find the closest unit of the specified type, and you can also add a player entry to that table to specify which player (default is the local player) You can also specify just an SBP, in which case it will play on the first SBP found owned - use this for elite units who may or may not be on the map audioCtrlEvent: is a wwise event name. This parameter is used to apply an effect on the line of speech. Ex. \"Comm_on\" plays speech through a comm effect. Work with an audio designer to get more effects.

Parameters

  • actorActorTablerequired
  • locIDIntegerrequired
  • speechbubbleSGroup/SquadID/Tableoptional
  • audioCtrlEventStringoptional

Returns

Void

Source

Declared in the game's script sources at:

scar/speech.scar