Drag[en]gine Script Module DragonScript Script API  1.0
ConversationActor Class Reference

Actor in a conversation. More...

Inheritance diagram for ConversationActor:

Public Member Functions

void command (String command)
 Command send by the conversation script. More...
 
bool conditionCommand (String command)
 Condition command send by the conversation script. More...
 
SubTitleBoxText createSubTitleText (UnicodeString text, StringID style)
 Create sub title widget for actor matching speech style. More...
 
void decrementRemainingSpeechTime (float elapsedTime)
 Decrement remaining speech playback time in seconds. More...
 
void enterConversation ()
 Actor enters conversation. More...
 
StringID getAliasID ()
 Optional unique alias identifier of the actor in the conversation. More...
 
ConversationLookAtPlayback getEyesLookAtPlayback ()
 Eyes look-at playback or null if not used. More...
 
ConversationFacePosePlayback getFacePosePlayback ()
 Face pose playback or null if not used. More...
 
ConversationGesturePlayback getGesturePlayback ()
 Gesture playback or null if not used. More...
 
ConversationPlaybackGesturePose getGesturePose (StringID gestureID)
 
ConversationLookAtPlayback getHeadLookAtPlayback ()
 Head look-at playback or null if not used. More...
 
StringID getID ()
 Unique identifier of the actor in the conversation. More...
 
DMatrix getInverseMatrix ()
 Inverse conversation matrix. More...
 
DMatrix getInverseMatrix (String bone)
 Inverse conversation matrix. More...
 
DMatrix getMatrix ()
 Conversation matrix. More...
 
DMatrix getMatrix (String bone)
 Conversation matrix. More...
 
UnicodeString getName ()
 Name to display for the actor in subtitle boxes. More...
 
int getParameter (String parameter)
 Named actor parameter. More...
 
ConversationPlayback getPlayback ()
 Conversation playback of this actor. More...
 
float getRemainingSpeechTime ()
 Remaining speech playback time in seconds. More...
 
SpeechAnimationPlayback getSpeechAnimationPlayback ()
 Speech animation playback. More...
 
SubTitleBoxText getSubTitleText ()
 Sub title text or null if not set. More...
 
Speaker getVoiceSpeaker ()
 Speaker to play the actor voice during conversation. More...
 
bool isSpeaking ()
 Actor has finished speaking. More...
 
void leaveConversation ()
 Actor leaves conversation. More...
 
ConversationActor new (StringID id)
 Creates conversation actor. More...
 
void playbackRestoreObjectLinks ()
 Restore linked objects after loading. More...
 
void readFromFile (PersistencyEnvironment env, FileReader reader)
 Read from file. More...
 
void setAliasID (StringID id)
 Set optional unique alias identifier of the actor in the conversation. More...
 
void setEyesLookAtPlayback (ConversationLookAtPlayback playback)
 Set eyes look-at playback or null if not used. More...
 
void setFacePosePlayback (ConversationFacePosePlayback playback)
 Set face pose playback or null if not used. More...
 
void setGesturePlayback (ConversationGesturePlayback playback)
 Set gesture playback or null if not used. More...
 
void setHeadLookAtPlayback (ConversationLookAtPlayback playback)
 Set head look-at playback or null if not used. More...
 
void setName (UnicodeString name)
 Set name to display for the actor in subtitle boxes. More...
 
void setParameter (String parameter, int value)
 Set named actor parameter. More...
 
void setPlayback (ConversationPlayback playback)
 Set conversation playback of this actor. More...
 
void setRemainingSpeechTime (float remainingTime)
 Set ramaining speech playback time in seconds. More...
 
void setSpeechAnimationPlayback (SpeechAnimationPlayback playback)
 Set speech animation playback. More...
 
void setSubTitleText (SubTitleBoxText text)
 Set sub title text or null to clear it. More...
 
void setVoiceSpeaker (Speaker speaker)
 Set speaker to play the actor voice during conversation. More...
 
void updateAfterLocomotion (float elapsed, AnimatorInstance sourceAnimatorInstance)
 Update existing playback objects not affecting actor locomotion. More...
 
void updateBeforeLocomotion (float elapsed)
 Update existing playback objects affecting actor locomotion. More...
 
bool wait ()
 Actor is blocking if conversation action waits for this actor. More...
 
void writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write to file. More...
 

Detailed Description

Actor in a conversation.

Contains the playback information required to animate and interact properly with the actor. Create a subclass to implement the required methods with the conversation logic of the actor. Most parameters are considered to be static. You only have to overload the marked methods. The methods to overwrite are:

Member Function Documentation

◆ command()

void command ( String  command)

Command send by the conversation script.

Overload to make the actor execute the action. The default implementation does nothing.

◆ conditionCommand()

bool conditionCommand ( String  command)

Condition command send by the conversation script.

Overload to make the actor evaluate the command returning true or false as result. The default implementation returns false.

◆ createSubTitleText()

SubTitleBoxText createSubTitleText ( UnicodeString  text,
StringID  style 
)

Create sub title widget for actor matching speech style.

Default implementation creates instance of SubTitleBoxText.

Parameters
textText to speak.
styleIdentifier of style to adjust font, color or sub title in general.

◆ decrementRemainingSpeechTime()

void decrementRemainingSpeechTime ( float  elapsedTime)

Decrement remaining speech playback time in seconds.

◆ enterConversation()

void enterConversation ( )

Actor enters conversation.

Overwrite to switch actor to operate in conversation.

◆ getAliasID()

StringID getAliasID ( )

Optional unique alias identifier of the actor in the conversation.

◆ getEyesLookAtPlayback()

ConversationLookAtPlayback getEyesLookAtPlayback ( )

Eyes look-at playback or null if not used.

◆ getFacePosePlayback()

ConversationFacePosePlayback getFacePosePlayback ( )

Face pose playback or null if not used.

◆ getGesturePlayback()

ConversationGesturePlayback getGesturePlayback ( )

Gesture playback or null if not used.

◆ getGesturePose()

ConversationPlaybackGesturePose getGesturePose ( StringID  gestureID)

Retrieves a gesture pose or null if not found.

◆ getHeadLookAtPlayback()

ConversationLookAtPlayback getHeadLookAtPlayback ( )

Head look-at playback or null if not used.

◆ getID()

StringID getID ( )

Unique identifier of the actor in the conversation.

◆ getInverseMatrix() [1/2]

DMatrix getInverseMatrix ( )

Inverse conversation matrix.

◆ getInverseMatrix() [2/2]

DMatrix getInverseMatrix ( String  bone)

Inverse conversation matrix.

◆ getMatrix() [1/2]

DMatrix getMatrix ( )

Conversation matrix.

This is the matrix relative to the actor coordinate frame. In general this is the same as the position and orientation of the actor. This is also the reference frame expected by the conversation editor. Overwrite to return the actor matrix. The default implementation returns the identity matrix.

◆ getMatrix() [2/2]

DMatrix getMatrix ( String  bone)

Conversation matrix.

This is the matrix relative to the actor coordinate frame. In general this is the same as the position and orientation of the actor. This is also the reference frame expected by the conversation editor. Overwrite to return the actor matrix. The default implementation returns the identity matrix. If bone is not null the matrix has to be relative to the named bone if existing.

◆ getName()

UnicodeString getName ( )

Name to display for the actor in subtitle boxes.

◆ getParameter()

int getParameter ( String  parameter)

Named actor parameter.

◆ getPlayback()

ConversationPlayback getPlayback ( )

Conversation playback of this actor.

◆ getRemainingSpeechTime()

float getRemainingSpeechTime ( )

Remaining speech playback time in seconds.

◆ getSpeechAnimationPlayback()

SpeechAnimationPlayback getSpeechAnimationPlayback ( )

Speech animation playback.

◆ getSubTitleText()

SubTitleBoxText getSubTitleText ( )

Sub title text or null if not set.

◆ getVoiceSpeaker()

Speaker getVoiceSpeaker ( )

Speaker to play the actor voice during conversation.

◆ isSpeaking()

bool isSpeaking ( )

Actor has finished speaking.

This is used by the conversation playback. Checks if the voice speaker (if existing) is playing back a sound or if the speech animation (playback (if existing) is playing back.

◆ leaveConversation()

void leaveConversation ( )

Actor leaves conversation.

Overwrite to switch actor back to operating on its own.

◆ new()

Creates conversation actor.

◆ playbackRestoreObjectLinks()

void playbackRestoreObjectLinks ( )

Restore linked objects after loading.

While loading playback object is not available yet. Linked objects can not be restored during readFromFile(). Once all loading is done and the playback is present objects this call is used to restore the object links.

◆ readFromFile()

void readFromFile ( PersistencyEnvironment  env,
FileReader  reader 
)

Read from file.

◆ setAliasID()

void setAliasID ( StringID  id)

Set optional unique alias identifier of the actor in the conversation.

◆ setEyesLookAtPlayback()

void setEyesLookAtPlayback ( ConversationLookAtPlayback  playback)

Set eyes look-at playback or null if not used.

◆ setFacePosePlayback()

void setFacePosePlayback ( ConversationFacePosePlayback  playback)

Set face pose playback or null if not used.

◆ setGesturePlayback()

void setGesturePlayback ( ConversationGesturePlayback  playback)

Set gesture playback or null if not used.

◆ setHeadLookAtPlayback()

void setHeadLookAtPlayback ( ConversationLookAtPlayback  playback)

Set head look-at playback or null if not used.

◆ setName()

void setName ( UnicodeString  name)

Set name to display for the actor in subtitle boxes.

◆ setParameter()

void setParameter ( String  parameter,
int  value 
)

Set named actor parameter.

◆ setPlayback()

void setPlayback ( ConversationPlayback  playback)

Set conversation playback of this actor.

◆ setRemainingSpeechTime()

void setRemainingSpeechTime ( float  remainingTime)

Set ramaining speech playback time in seconds.

◆ setSpeechAnimationPlayback()

void setSpeechAnimationPlayback ( SpeechAnimationPlayback  playback)

Set speech animation playback.

◆ setSubTitleText()

void setSubTitleText ( SubTitleBoxText  text)

Set sub title text or null to clear it.

◆ setVoiceSpeaker()

void setVoiceSpeaker ( Speaker  speaker)

Set speaker to play the actor voice during conversation.

◆ updateAfterLocomotion()

void updateAfterLocomotion ( float  elapsed,
AnimatorInstance  sourceAnimatorInstance 
)

Update existing playback objects not affecting actor locomotion.

This method is called after the actor locomotion is updated. This includes all existing playback objects not updated in updatePlaybackBeforeLocomotion.

◆ updateBeforeLocomotion()

void updateBeforeLocomotion ( float  elapsed)

Update existing playback objects affecting actor locomotion.

This method is called before the actor locomotion is updated. This includes the head look-at playback if existing.

◆ wait()

bool wait ( )

Actor is blocking if conversation action waits for this actor.

Overload to retrieve the value form the real actor. The default implementation returns false.

◆ writeToFile()

void writeToFile ( PersistencyEnvironment  env,
FileWriter  writer 
)

Write to file.


The documentation for this class was generated from the following file: