Drag[en]gine Script Module DragonScript  1.23
Dragengine.ConversationSystem.ConversationActor Class Reference

Actor in a conversation. More...

Inheritance diagram for Dragengine.ConversationSystem.ConversationActor:

Public Member Functions

void applyAnimations ()
 Apply animation for all present playback instances. More...
 
void beginActorSpeech (CActionActorSpeak action)
 Actor speech has been started by CActionActorSpeak. More...
 
void clearAllPlayback ()
 Clear all playbacks. More...
 
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)
 Gesture pose or null if not found. More...
 
ConversationGesturePoseList getGesturePoses ()
 Gesture poses to use or null. More...
 
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...
 
ParameterTable getParameterTable ()
 Parameter table to use or null. 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 setGesturePoses (ConversationGesturePoseList gesturePoses)
 Set gesture poses to use or null. 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 setParameterTable (ParameterTable parameterTable)
 Parameter table to use or null. 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. Set all the required parameters to customize the actor. Optionally create a subclass to overwrite basic behavior with your own for complex custom actors. These are the methods that are typically overwritten for such complex actors:

Member Function Documentation

◆ applyAnimations()

void Dragengine.ConversationSystem.ConversationActor.applyAnimations ( )

Apply animation for all present playback instances.

This method is called after all animations states have been updated and the all animation states are about to be applied in the correct order.

◆ beginActorSpeech()

void Dragengine.ConversationSystem.ConversationActor.beginActorSpeech ( CActionActorSpeak  action)

Actor speech has been started by CActionActorSpeak.

Version
1.9

Called after setting up actor speech and before advancing conversation playback. Allows sub class to apply additional game actions at begin of actor speech started by instance of CActionActorSpeak. This method is always called no matter if the action set up any speech parameters or not. Use the action parameter to figure out if this is the case.

Parameters
actionAction starting speech or null if called otherwise.

◆ clearAllPlayback()

void Dragengine.ConversationSystem.ConversationActor.clearAllPlayback ( )

Clear all playbacks.

◆ command()

void Dragengine.ConversationSystem.ConversationActor.command ( String  command)

Command send by the conversation script.

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

◆ conditionCommand()

bool Dragengine.ConversationSystem.ConversationActor.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 Dragengine.ConversationSystem.ConversationActor.createSubTitleText ( UnicodeString  text,
StringID  style 
)

Create sub title widget for actor matching speech style.

Default implementation creates instance of SubTitleBoxTexBordert.

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

◆ decrementRemainingSpeechTime()

void Dragengine.ConversationSystem.ConversationActor.decrementRemainingSpeechTime ( float  elapsedTime)

Decrement remaining speech playback time in seconds.

◆ enterConversation()

void Dragengine.ConversationSystem.ConversationActor.enterConversation ( )

Actor enters conversation.

Overwrite to switch actor to operate in conversation.

◆ getAliasID()

StringID Dragengine.ConversationSystem.ConversationActor.getAliasID ( )

Optional unique alias identifier of the actor in the conversation.

◆ getEyesLookAtPlayback()

ConversationLookAtPlayback Dragengine.ConversationSystem.ConversationActor.getEyesLookAtPlayback ( )

Eyes look-at playback or null if not used.

◆ getFacePosePlayback()

ConversationFacePosePlayback Dragengine.ConversationSystem.ConversationActor.getFacePosePlayback ( )

Face pose playback or null if not used.

◆ getGesturePlayback()

ConversationGesturePlayback Dragengine.ConversationSystem.ConversationActor.getGesturePlayback ( )

Gesture playback or null if not used.

◆ getGesturePose()

ConversationPlaybackGesturePose Dragengine.ConversationSystem.ConversationActor.getGesturePose ( StringID  gestureId)

Gesture pose or null if not found.

Default implementation looks up the gesture pose in the assigned gesture poses if the gesture poses is not null.

◆ getGesturePoses()

ConversationGesturePoseList Dragengine.ConversationSystem.ConversationActor.getGesturePoses ( )

Gesture poses to use or null.

◆ getHeadLookAtPlayback()

ConversationLookAtPlayback Dragengine.ConversationSystem.ConversationActor.getHeadLookAtPlayback ( )

Head look-at playback or null if not used.

◆ getID()

StringID Dragengine.ConversationSystem.ConversationActor.getID ( )

Unique identifier of the actor in the conversation.

◆ getInverseMatrix() [1/2]

DMatrix Dragengine.ConversationSystem.ConversationActor.getInverseMatrix ( )

Inverse conversation matrix.

◆ getInverseMatrix() [2/2]

DMatrix Dragengine.ConversationSystem.ConversationActor.getInverseMatrix ( String  bone)

Inverse conversation matrix.

◆ getMatrix() [1/2]

DMatrix Dragengine.ConversationSystem.ConversationActor.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 Dragengine.ConversationSystem.ConversationActor.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 Dragengine.ConversationSystem.ConversationActor.getName ( )

Name to display for the actor in subtitle boxes.

◆ getParameter()

int Dragengine.ConversationSystem.ConversationActor.getParameter ( String  parameter)

Named actor parameter.

Returns value from set parameter table entry with matching name. Returns 0 if no parameter table is set, no entry matches the name or the matching entry is has no value set.

◆ getParameterTable()

ParameterTable Dragengine.ConversationSystem.ConversationActor.getParameterTable ( )

Parameter table to use or null.

◆ getPlayback()

ConversationPlayback Dragengine.ConversationSystem.ConversationActor.getPlayback ( )

Conversation playback of this actor.

◆ getRemainingSpeechTime()

float Dragengine.ConversationSystem.ConversationActor.getRemainingSpeechTime ( )

Remaining speech playback time in seconds.

◆ getSpeechAnimationPlayback()

SpeechAnimationPlayback Dragengine.ConversationSystem.ConversationActor.getSpeechAnimationPlayback ( )

Speech animation playback.

◆ getSubTitleText()

SubTitleBoxText Dragengine.ConversationSystem.ConversationActor.getSubTitleText ( )

Sub title text or null if not set.

◆ getVoiceSpeaker()

Speaker Dragengine.ConversationSystem.ConversationActor.getVoiceSpeaker ( )

Speaker to play the actor voice during conversation.

◆ isSpeaking()

bool Dragengine.ConversationSystem.ConversationActor.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 Dragengine.ConversationSystem.ConversationActor.leaveConversation ( )

Actor leaves conversation.

Overwrite to switch actor back to operating on its own.

◆ new()

ConversationActor Dragengine.ConversationSystem.ConversationActor.new ( StringID  id)

Creates conversation actor.

◆ playbackRestoreObjectLinks()

void Dragengine.ConversationSystem.ConversationActor.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 Dragengine.ConversationSystem.ConversationActor.readFromFile ( PersistencyEnvironment  env,
FileReader  reader 
)

Read from file.

◆ setAliasID()

void Dragengine.ConversationSystem.ConversationActor.setAliasID ( StringID  id)

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

◆ setEyesLookAtPlayback()

void Dragengine.ConversationSystem.ConversationActor.setEyesLookAtPlayback ( ConversationLookAtPlayback  playback)

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

◆ setFacePosePlayback()

void Dragengine.ConversationSystem.ConversationActor.setFacePosePlayback ( ConversationFacePosePlayback  playback)

Set face pose playback or null if not used.

◆ setGesturePlayback()

void Dragengine.ConversationSystem.ConversationActor.setGesturePlayback ( ConversationGesturePlayback  playback)

Set gesture playback or null if not used.

◆ setGesturePoses()

void Dragengine.ConversationSystem.ConversationActor.setGesturePoses ( ConversationGesturePoseList  gesturePoses)

Set gesture poses to use or null.

◆ setHeadLookAtPlayback()

void Dragengine.ConversationSystem.ConversationActor.setHeadLookAtPlayback ( ConversationLookAtPlayback  playback)

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

◆ setName()

void Dragengine.ConversationSystem.ConversationActor.setName ( UnicodeString  name)

Set name to display for the actor in subtitle boxes.

◆ setParameter()

void Dragengine.ConversationSystem.ConversationActor.setParameter ( String  parameter,
int  value 
)

Set named actor parameter.

Sets value in parameter table if parameter table is set.

◆ setParameterTable()

void Dragengine.ConversationSystem.ConversationActor.setParameterTable ( ParameterTable  parameterTable)

Parameter table to use or null.

◆ setPlayback()

void Dragengine.ConversationSystem.ConversationActor.setPlayback ( ConversationPlayback  playback)

Set conversation playback of this actor.

◆ setRemainingSpeechTime()

void Dragengine.ConversationSystem.ConversationActor.setRemainingSpeechTime ( float  remainingTime)

Set ramaining speech playback time in seconds.

◆ setSpeechAnimationPlayback()

void Dragengine.ConversationSystem.ConversationActor.setSpeechAnimationPlayback ( SpeechAnimationPlayback  playback)

Set speech animation playback.

◆ setSubTitleText()

void Dragengine.ConversationSystem.ConversationActor.setSubTitleText ( SubTitleBoxText  text)

Set sub title text or null to clear it.

◆ setVoiceSpeaker()

void Dragengine.ConversationSystem.ConversationActor.setVoiceSpeaker ( Speaker  speaker)

Set speaker to play the actor voice during conversation.

◆ updateAfterLocomotion()

void Dragengine.ConversationSystem.ConversationActor.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. This does not apply the animation yet to allow proper use of state capturing.

◆ updateBeforeLocomotion()

void Dragengine.ConversationSystem.ConversationActor.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. This does not apply the animation yet to allow proper use of state capturing.

◆ wait()

bool Dragengine.ConversationSystem.ConversationActor.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 Dragengine.ConversationSystem.ConversationActor.writeToFile ( PersistencyEnvironment  env,
FileWriter  writer 
)

Write to file.


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