|
Drag[en]gine Script Module DragonScript 1.35
|
Actor in a conversation. More...
Public Member Functions | |
| void | applyAnimations () |
| Apply animation for all present playback instances. | |
| void | beginActorSpeech (CActionActorSpeak action) |
| Actor speech has been started by CActionActorSpeak. | |
| void | clearAllPlayback () |
| Clear all playbacks. | |
| void | command (String command) |
| Command send by the conversation script. | |
| bool | conditionCommand (String command) |
| Condition command send by the conversation script. | |
| SubTitleBoxText | createSubTitleText (UnicodeString text, StringID style) |
| Create sub title widget for actor matching speech style. | |
| void | decrementRemainingSpeechTime (float elapsedTime) |
| Decrement remaining speech playback time in seconds. | |
| void | enterConversation () |
| Actor enters conversation. | |
| StringID | getAliasID () |
| Optional unique alias identifier of the actor in the conversation. | |
| ConversationLookAtPlayback | getEyesLookAtPlayback () |
| Eyes look-at playback or null if not used. | |
| ConversationFacePosePlayback | getFacePosePlayback () |
| Face pose playback or null if not used. | |
| ConversationGesturePlayback | getGesturePlayback () |
| Gesture playback or null if not used. | |
| ConversationPlaybackGesturePose | getGesturePose (StringID gestureId) |
| Gesture pose or null if not found. | |
| ConversationGesturePoseList | getGesturePoses () |
| Gesture poses to use or null. | |
| ConversationLookAtPlayback | getHeadLookAtPlayback () |
| Head look-at playback or null if not used. | |
| StringID | getID () |
| Unique identifier of the actor in the conversation. | |
| DMatrix | getInverseMatrix () |
| Inverse conversation matrix. | |
| DMatrix | getInverseMatrix (String bone) |
| Inverse conversation matrix. | |
| DMatrix | getMatrix () |
| Conversation matrix. | |
| DMatrix | getMatrix (String bone) |
| Conversation matrix. | |
| UnicodeString | getName () |
| Name to display for the actor in subtitle boxes. | |
| int | getParameter (String parameter) |
| Named actor parameter. | |
| ParameterTable | getParameterTable () |
| Parameter table to use or null. | |
| ConversationPlayback | getPlayback () |
| Conversation playback of this actor. | |
| float | getRemainingSpeechTime () |
| Remaining speech playback time in seconds. | |
| SpeechAnimationPlayback | getSpeechAnimationPlayback () |
| Speech animation playback. | |
| SubTitleBoxText | getSubTitleText () |
| Sub title text or null if not set. | |
| Speaker | getVoiceSpeaker () |
| Speaker to play the actor voice during conversation. | |
| bool | isSpeaking () |
| Actor has finished speaking. | |
| void | leaveConversation () |
| Actor leaves conversation. | |
| ConversationActor | new (StringID id) |
| Creates conversation actor. | |
| void | playbackRestoreObjectLinks () |
| Restore linked objects after loading. | |
| void | readFromFile (PersistencyEnvironment env, FileReader reader) |
| Read from file. | |
| void | setAliasID (StringID id) |
| Set optional unique alias identifier of the actor in the conversation. | |
| void | setEyesLookAtPlayback (ConversationLookAtPlayback playback) |
| Set eyes look-at playback or null if not used. | |
| void | setFacePosePlayback (ConversationFacePosePlayback playback) |
| Set face pose playback or null if not used. | |
| void | setGesturePlayback (ConversationGesturePlayback playback) |
| Set gesture playback or null if not used. | |
| void | setGesturePoses (ConversationGesturePoseList gesturePoses) |
| Set gesture poses to use or null. | |
| void | setHeadLookAtPlayback (ConversationLookAtPlayback playback) |
| Set head look-at playback or null if not used. | |
| void | setName (UnicodeString name) |
| Set name to display for the actor in subtitle boxes. | |
| void | setParameter (String parameter, int value) |
| Set named actor parameter. | |
| void | setParameterTable (ParameterTable parameterTable) |
| Parameter table to use or null. | |
| void | setPlayback (ConversationPlayback playback) |
| Set conversation playback of this actor. | |
| void | setRemainingSpeechTime (float remainingTime) |
| Set ramaining speech playback time in seconds. | |
| void | setSpeechAnimationPlayback (SpeechAnimationPlayback playback) |
| Set speech animation playback. | |
| void | setSubTitleText (SubTitleBoxText text) |
| Set sub title text or null to clear it. | |
| void | setVoiceSpeaker (Speaker speaker) |
| Set speaker to play the actor voice during conversation. | |
| void | updateAfterLocomotion (float elapsed, AnimatorInstance sourceAnimatorInstance) |
| Update existing playback objects not affecting actor locomotion. | |
| void | updateBeforeLocomotion (float elapsed) |
| Update existing playback objects affecting actor locomotion. | |
| bool | wait () |
| Actor is blocking if conversation action waits for this actor. | |
| void | writeToFile (PersistencyEnvironment env, FileWriter writer) |
| Write to file. | |
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.
References setHeadLookAtPlayback().
Referenced by createSubTitleText().
| 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. |
References getSubTitleText(), and setSubTitleText().
Referenced by setParameter().
| void Dragengine.ConversationSystem.ConversationActor.clearAllPlayback | ( | ) |
Clear all playbacks.
References getFacePosePlayback(), and setFacePosePlayback().
Referenced by leaveConversation().
| 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.
References getRemainingSpeechTime().
Referenced by writeToFile().
| 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.
References decrementRemainingSpeechTime(), and setRemainingSpeechTime().
Referenced by writeToFile().
| 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. |
References applyAnimations().
Referenced by writeToFile().
| void Dragengine.ConversationSystem.ConversationActor.decrementRemainingSpeechTime | ( | float | elapsedTime | ) |
Decrement remaining speech playback time in seconds.
References getSpeechAnimationPlayback(), and setSpeechAnimationPlayback().
Referenced by conditionCommand().
| void Dragengine.ConversationSystem.ConversationActor.enterConversation | ( | ) |
Actor enters conversation.
Overwrite to switch actor to operate in conversation.
Referenced by getGesturePlayback(), and writeToFile().
| StringID Dragengine.ConversationSystem.ConversationActor.getAliasID | ( | ) |
Optional unique alias identifier of the actor in the conversation.
Referenced by getName().
| ConversationLookAtPlayback Dragengine.ConversationSystem.ConversationActor.getEyesLookAtPlayback | ( | ) |
Eyes look-at playback or null if not used.
References setParameterTable().
Referenced by isSpeaking().
| ConversationFacePosePlayback Dragengine.ConversationSystem.ConversationActor.getFacePosePlayback | ( | ) |
Face pose playback or null if not used.
Referenced by clearAllPlayback().
| ConversationGesturePlayback Dragengine.ConversationSystem.ConversationActor.getGesturePlayback | ( | ) |
Gesture playback or null if not used.
References enterConversation().
Referenced by updateBeforeLocomotion().
| 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.
Referenced by writeToFile().
| ConversationGesturePoseList Dragengine.ConversationSystem.ConversationActor.getGesturePoses | ( | ) |
| ConversationLookAtPlayback Dragengine.ConversationSystem.ConversationActor.getHeadLookAtPlayback | ( | ) |
Head look-at playback or null if not used.
Referenced by updateAfterLocomotion().
| StringID Dragengine.ConversationSystem.ConversationActor.getID | ( | ) |
Unique identifier of the actor in the conversation.
Referenced by setAliasID().
| DMatrix Dragengine.ConversationSystem.ConversationActor.getInverseMatrix | ( | ) |
Inverse conversation matrix.
Referenced by writeToFile().
| DMatrix Dragengine.ConversationSystem.ConversationActor.getInverseMatrix | ( | String | bone | ) |
Inverse conversation matrix.
References updateAfterLocomotion().
| 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.
References updateBeforeLocomotion().
Referenced by writeToFile().
| 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.
References getAliasID().
Referenced by getVoiceSpeaker().
| 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.
Referenced by writeToFile().
| ParameterTable Dragengine.ConversationSystem.ConversationActor.getParameterTable | ( | ) |
Parameter table to use or null.
Referenced by setFacePosePlayback().
| ConversationPlayback Dragengine.ConversationSystem.ConversationActor.getPlayback | ( | ) |
| float Dragengine.ConversationSystem.ConversationActor.getRemainingSpeechTime | ( | ) |
Remaining speech playback time in seconds.
Referenced by command().
| SpeechAnimationPlayback Dragengine.ConversationSystem.ConversationActor.getSpeechAnimationPlayback | ( | ) |
| SubTitleBoxText Dragengine.ConversationSystem.ConversationActor.getSubTitleText | ( | ) |
Sub title text or null if not set.
References leaveConversation().
Referenced by beginActorSpeech().
| Speaker Dragengine.ConversationSystem.ConversationActor.getVoiceSpeaker | ( | ) |
Speaker to play the actor voice during conversation.
References getName().
Referenced by setGesturePlayback().
| 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.
References getEyesLookAtPlayback().
Referenced by writeToFile().
| void Dragengine.ConversationSystem.ConversationActor.leaveConversation | ( | ) |
Actor leaves conversation.
Overwrite to switch actor back to operating on its own.
References clearAllPlayback().
Referenced by getSubTitleText(), and writeToFile().
| ConversationActor Dragengine.ConversationSystem.ConversationActor.new | ( | StringID | id | ) |
| 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.
Referenced by writeToFile().
| void Dragengine.ConversationSystem.ConversationActor.readFromFile | ( | PersistencyEnvironment | env, |
| FileReader | reader ) |
Read from file.
Referenced by writeToFile().
| void Dragengine.ConversationSystem.ConversationActor.setAliasID | ( | StringID | id | ) |
Set optional unique alias identifier of the actor in the conversation.
References getID().
Referenced by getPlayback().
| void Dragengine.ConversationSystem.ConversationActor.setEyesLookAtPlayback | ( | ConversationLookAtPlayback | playback | ) |
| void Dragengine.ConversationSystem.ConversationActor.setFacePosePlayback | ( | ConversationFacePosePlayback | playback | ) |
Set face pose playback or null if not used.
References getParameterTable().
Referenced by clearAllPlayback().
| void Dragengine.ConversationSystem.ConversationActor.setGesturePlayback | ( | ConversationGesturePlayback | playback | ) |
Set gesture playback or null if not used.
References getVoiceSpeaker().
Referenced by updateBeforeLocomotion().
| void Dragengine.ConversationSystem.ConversationActor.setGesturePoses | ( | ConversationGesturePoseList | gesturePoses | ) |
Set gesture poses to use or null.
Referenced by setRemainingSpeechTime().
| void Dragengine.ConversationSystem.ConversationActor.setHeadLookAtPlayback | ( | ConversationLookAtPlayback | playback | ) |
Set head look-at playback or null if not used.
References setVoiceSpeaker().
Referenced by applyAnimations().
| void Dragengine.ConversationSystem.ConversationActor.setName | ( | UnicodeString | name | ) |
Set name to display for the actor in subtitle boxes.
Referenced by setVoiceSpeaker().
| void Dragengine.ConversationSystem.ConversationActor.setParameter | ( | String | parameter, |
| int | value ) |
Set named actor parameter.
Sets value in parameter table if parameter table is set.
References beginActorSpeech().
Referenced by writeToFile().
| void Dragengine.ConversationSystem.ConversationActor.setParameterTable | ( | ParameterTable | parameterTable | ) |
Parameter table to use or null.
Referenced by getEyesLookAtPlayback().
| void Dragengine.ConversationSystem.ConversationActor.setPlayback | ( | ConversationPlayback | playback | ) |
Set conversation playback of this actor.
Referenced by getSpeechAnimationPlayback().
| void Dragengine.ConversationSystem.ConversationActor.setRemainingSpeechTime | ( | float | remainingTime | ) |
Set ramaining speech playback time in seconds.
References setGesturePoses().
Referenced by conditionCommand().
| void Dragengine.ConversationSystem.ConversationActor.setSpeechAnimationPlayback | ( | SpeechAnimationPlayback | playback | ) |
Set speech animation playback.
Referenced by decrementRemainingSpeechTime().
| void Dragengine.ConversationSystem.ConversationActor.setSubTitleText | ( | SubTitleBoxText | text | ) |
Set sub title text or null to clear it.
Referenced by beginActorSpeech().
| void Dragengine.ConversationSystem.ConversationActor.setVoiceSpeaker | ( | Speaker | speaker | ) |
Set speaker to play the actor voice during conversation.
References setName().
Referenced by setHeadLookAtPlayback().
| 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.
References getHeadLookAtPlayback().
Referenced by getInverseMatrix().
| 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.
References getGesturePlayback(), and setGesturePlayback().
Referenced by getMatrix().
| 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.
References setEyesLookAtPlayback().
Referenced by writeToFile().
| void Dragengine.ConversationSystem.ConversationActor.writeToFile | ( | PersistencyEnvironment | env, |
| FileWriter | writer ) |
Write to file.
References command(), conditionCommand(), createSubTitleText(), enterConversation(), getGesturePose(), getInverseMatrix(), getMatrix(), getParameter(), isSpeaking(), leaveConversation(), playbackRestoreObjectLinks(), readFromFile(), setParameter(), wait(), and writeToFile().
Referenced by writeToFile().