Drag[en]gine Script Module DragonScript
1.21
|
Actor in a conversation. More...
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... | |
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:
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.
void Dragengine.ConversationSystem.ConversationActor.beginActorSpeech | ( | CActionActorSpeak | action | ) |
Actor speech has been started by CActionActorSpeak.
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.
action | Action starting speech or null if called otherwise. |
void Dragengine.ConversationSystem.ConversationActor.clearAllPlayback | ( | ) |
Clear all playbacks.
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.
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.
SubTitleBoxText Dragengine.ConversationSystem.ConversationActor.createSubTitleText | ( | UnicodeString | text, |
StringID | style | ||
) |
Create sub title widget for actor matching speech style.
Default implementation creates instance of SubTitleBoxTexBordert.
text | Text to speak. |
style | Identifier of style to adjust font, color or sub title in general. |
void Dragengine.ConversationSystem.ConversationActor.decrementRemainingSpeechTime | ( | float | elapsedTime | ) |
Decrement remaining speech playback time in seconds.
void Dragengine.ConversationSystem.ConversationActor.enterConversation | ( | ) |
Actor enters conversation.
Overwrite to switch actor to operate in conversation.
StringID Dragengine.ConversationSystem.ConversationActor.getAliasID | ( | ) |
Optional unique alias identifier of the actor in the conversation.
ConversationLookAtPlayback Dragengine.ConversationSystem.ConversationActor.getEyesLookAtPlayback | ( | ) |
Eyes look-at playback or null if not used.
ConversationFacePosePlayback Dragengine.ConversationSystem.ConversationActor.getFacePosePlayback | ( | ) |
Face pose playback or null if not used.
ConversationGesturePlayback Dragengine.ConversationSystem.ConversationActor.getGesturePlayback | ( | ) |
Gesture playback or null if not used.
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.
ConversationGesturePoseList Dragengine.ConversationSystem.ConversationActor.getGesturePoses | ( | ) |
Gesture poses to use or null.
ConversationLookAtPlayback Dragengine.ConversationSystem.ConversationActor.getHeadLookAtPlayback | ( | ) |
Head look-at playback or null if not used.
StringID Dragengine.ConversationSystem.ConversationActor.getID | ( | ) |
Unique identifier of the actor in the conversation.
DMatrix Dragengine.ConversationSystem.ConversationActor.getInverseMatrix | ( | ) |
Inverse conversation matrix.
DMatrix Dragengine.ConversationSystem.ConversationActor.getInverseMatrix | ( | String | bone | ) |
Inverse conversation matrix.
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.
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.
UnicodeString Dragengine.ConversationSystem.ConversationActor.getName | ( | ) |
Name to display for the actor in subtitle boxes.
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.
ParameterTable Dragengine.ConversationSystem.ConversationActor.getParameterTable | ( | ) |
Parameter table to use or null.
ConversationPlayback Dragengine.ConversationSystem.ConversationActor.getPlayback | ( | ) |
Conversation playback of this actor.
float Dragengine.ConversationSystem.ConversationActor.getRemainingSpeechTime | ( | ) |
Remaining speech playback time in seconds.
SpeechAnimationPlayback Dragengine.ConversationSystem.ConversationActor.getSpeechAnimationPlayback | ( | ) |
Speech animation playback.
SubTitleBoxText Dragengine.ConversationSystem.ConversationActor.getSubTitleText | ( | ) |
Sub title text or null if not set.
Speaker Dragengine.ConversationSystem.ConversationActor.getVoiceSpeaker | ( | ) |
Speaker to play the actor voice during conversation.
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.
void Dragengine.ConversationSystem.ConversationActor.leaveConversation | ( | ) |
Actor leaves conversation.
Overwrite to switch actor back to operating on its own.
ConversationActor Dragengine.ConversationSystem.ConversationActor.new | ( | StringID | id | ) |
Creates conversation actor.
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.
void Dragengine.ConversationSystem.ConversationActor.readFromFile | ( | PersistencyEnvironment | env, |
FileReader | reader | ||
) |
Read from file.
void Dragengine.ConversationSystem.ConversationActor.setAliasID | ( | StringID | id | ) |
Set optional unique alias identifier of the actor in the conversation.
void Dragengine.ConversationSystem.ConversationActor.setEyesLookAtPlayback | ( | ConversationLookAtPlayback | playback | ) |
Set eyes look-at playback or null if not used.
void Dragengine.ConversationSystem.ConversationActor.setFacePosePlayback | ( | ConversationFacePosePlayback | playback | ) |
Set face pose playback or null if not used.
void Dragengine.ConversationSystem.ConversationActor.setGesturePlayback | ( | ConversationGesturePlayback | playback | ) |
Set gesture playback or null if not used.
void Dragengine.ConversationSystem.ConversationActor.setGesturePoses | ( | ConversationGesturePoseList | gesturePoses | ) |
Set gesture poses to use or null.
void Dragengine.ConversationSystem.ConversationActor.setHeadLookAtPlayback | ( | ConversationLookAtPlayback | playback | ) |
Set head look-at playback or null if not used.
void Dragengine.ConversationSystem.ConversationActor.setName | ( | UnicodeString | name | ) |
Set name to display for the actor in subtitle boxes.
void Dragengine.ConversationSystem.ConversationActor.setParameter | ( | String | parameter, |
int | value | ||
) |
Set named actor parameter.
Sets value in parameter table if parameter table is set.
void Dragengine.ConversationSystem.ConversationActor.setParameterTable | ( | ParameterTable | parameterTable | ) |
Parameter table to use or null.
void Dragengine.ConversationSystem.ConversationActor.setPlayback | ( | ConversationPlayback | playback | ) |
Set conversation playback of this actor.
void Dragengine.ConversationSystem.ConversationActor.setRemainingSpeechTime | ( | float | remainingTime | ) |
Set ramaining speech playback time in seconds.
void Dragengine.ConversationSystem.ConversationActor.setSpeechAnimationPlayback | ( | SpeechAnimationPlayback | playback | ) |
Set speech animation playback.
void Dragengine.ConversationSystem.ConversationActor.setSubTitleText | ( | SubTitleBoxText | text | ) |
Set sub title text or null to clear it.
void Dragengine.ConversationSystem.ConversationActor.setVoiceSpeaker | ( | Speaker | speaker | ) |
Set speaker to play the actor voice during conversation.
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.
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.
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.
void Dragengine.ConversationSystem.ConversationActor.writeToFile | ( | PersistencyEnvironment | env, |
FileWriter | writer | ||
) |
Write to file.