Drag[en]gine Script Module DragonScript Script API  1.0
ConversationActor Class Reference
Inheritance diagram for ConversationActor:

Public Member Functions

void command (String command)
 
bool conditionCommand (String command)
 
SubTitleBoxText createSubTitleText (UnicodeString text, StringID style)
 Create sub title widget for actor matching speech style. More...
 
void decrementRemainingSpeechTime (float elapsedTime)
 
void enterConversation ()
 Actor enters conversation. More...
 
StringID getAliasID ()
 
ConversationLookAtPlayback getEyesLookAtPlayback ()
 
ConversationFacePosePlayback getFacePosePlayback ()
 
ConversationGesturePlayback getGesturePlayback ()
 
ConversationPlaybackGesturePose getGesturePose (StringID gestureID)
 
ConversationLookAtPlayback getHeadLookAtPlayback ()
 
StringID getID ()
 
DMatrix getInverseMatrix ()
 Inverse conversation matrix. More...
 
DMatrix getInverseMatrix (String bone)
 Inverse conversation matrix. More...
 
DMatrix getMatrix ()
 
DMatrix getMatrix (String bone)
 
UnicodeString getName ()
 
int getParameter (String parameter)
 
ConversationPlayback getPlayback ()
 
float getRemainingSpeechTime ()
 
SpeechAnimationPlayback getSpeechAnimationPlayback ()
 
SubTitleBoxText getSubTitleText ()
 
Speaker getVoiceSpeaker ()
 
bool isSpeaking ()
 
void leaveConversation ()
 Actor leaves conversation. More...
 
ConversationActor new (StringID id)
 
void readFromFile (FileReader reader)
 
void setAliasID (StringID id)
 
void setEyesLookAtPlayback (ConversationLookAtPlayback playback)
 
void setFacePosePlayback (ConversationFacePosePlayback playback)
 
void setGesturePlayback (ConversationGesturePlayback playback)
 
void setHeadLookAtPlayback (ConversationLookAtPlayback playback)
 
void setName (UnicodeString name)
 
void setParameter (String parameter, int value)
 
void setPlayback (ConversationPlayback playback)
 
void setRemainingSpeechTime (float remainingTime)
 
void setSpeechAnimationPlayback (SpeechAnimationPlayback playback)
 
void setSubTitleText (SubTitleBoxText text)
 
void setVoiceSpeaker (Speaker speaker)
 
void updateAfterLocomotion (float elapsed, AnimatorInstance sourceAnimatorInstance)
 
void updateBeforeLocomotion (float elapsed)
 
bool wait ()
 
void writeToFile (FileWriter writer)
 

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

void command ( String  command)

Command send by the conversation script. Overload to make the actor execute the action. The default implementation does nothing.

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.

SubTitleBoxText createSubTitleText ( UnicodeString  text,
StringID  style 
)

Create sub title widget for actor matching speech style.

Default implementation uses sub title box gui theme font and white color creating an instance of SubTitleBoxText with it.

Overwrite to use individual fonts and colors for actors and speak type or modifying the text for example to replace game specific variables or formating hints.

Parameters
textText to speak.
styleIdentifier of style to adjust font, color or sub title in general.
void decrementRemainingSpeechTime ( float  elapsedTime)

Decrement remaining speech playback time in seconds.

void enterConversation ( )

Actor enters conversation.

Overwrite to switch actor to operate in conversation.

StringID getAliasID ( )

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

ConversationLookAtPlayback getEyesLookAtPlayback ( )

Retrieves the eyes look-at playback or null if not used.

ConversationFacePosePlayback getFacePosePlayback ( )

Retrieves the face pose playback or null if not used.

ConversationGesturePlayback getGesturePlayback ( )

Retrieves the gesture playback or null if not used.

ConversationPlaybackGesturePose getGesturePose ( StringID  gestureID)

Retrieves a gesture pose or null if not found.

ConversationLookAtPlayback getHeadLookAtPlayback ( )

Retrieves the head look-at playback or null if not used.

StringID getID ( )

Retrieves the unique identifier of the actor in the conversation.

DMatrix getInverseMatrix ( )

Inverse conversation matrix.

DMatrix getInverseMatrix ( String  bone)

Inverse conversation matrix.

DMatrix getMatrix ( )

Retrieves the 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.

DMatrix getMatrix ( String  bone)

Retrieves the 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.

UnicodeString getName ( )

Retrieves the name to display for the actor in subtitle boxes.

int getParameter ( String  parameter)

Retrieves a named actor parameter.

ConversationPlayback getPlayback ( )

Retrieves the conversation playback of this actor.

float getRemainingSpeechTime ( )

Retrieves the remaining speech playback time in seconds.

SpeechAnimationPlayback getSpeechAnimationPlayback ( )

Retrieves the speech animation playback.

SubTitleBoxText getSubTitleText ( )

Retrieves the sub title text or null if not set.

Speaker getVoiceSpeaker ( )

Retrieves the speaker to play the actor voice during conversation.

bool isSpeaking ( )

Determines if the 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.

void leaveConversation ( )

Actor leaves conversation.

Overwrite to switch actor back to operating on its own.

Creates a new conversation actor.

void readFromFile ( FileReader  reader)

Reads from a file.

void setAliasID ( StringID  id)

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

void setEyesLookAtPlayback ( ConversationLookAtPlayback  playback)

Sets the eyes look-at playback or null if not used.

void setFacePosePlayback ( ConversationFacePosePlayback  playback)

Sets the face pose playback or null if not used.

void setGesturePlayback ( ConversationGesturePlayback  playback)

Sets the gesture playback or null if not used.

void setHeadLookAtPlayback ( ConversationLookAtPlayback  playback)

Sets the head look-at playback or null if not used.

void setName ( UnicodeString  name)

Sets the name to display for the actor in subtitle boxes.

void setParameter ( String  parameter,
int  value 
)

Sets a named actor parameter.

void setPlayback ( ConversationPlayback  playback)

Sets the conversation playback of this actor.

void setRemainingSpeechTime ( float  remainingTime)

Sets the ramaining speech playback time in seconds.

void setSpeechAnimationPlayback ( SpeechAnimationPlayback  playback)

Sets the speech animation playback.

void setSubTitleText ( SubTitleBoxText  text)

Sets the sub title text or null to clear it.

void setVoiceSpeaker ( Speaker  speaker)

Sets the speaker to play the actor voice during conversation.

void updateAfterLocomotion ( float  elapsed,
AnimatorInstance  sourceAnimatorInstance 
)

Updates 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.

void updateBeforeLocomotion ( float  elapsed)

Updates 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.

bool wait ( )

Determines if the actor is doing something blocking if conversation actions wait for this actor. Overload to retrieve the value form the real actor. The default implementation returns false.

void writeToFile ( FileWriter  writer)

Write to a file.


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