User Tools

Site Tools


dragengine:modules:dragonscript:behavior_actortransmission

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
dragengine:modules:dragonscript:behavior_actortransmission [2021/11/04 17:48] – created dragonlorddragengine:modules:dragonscript:behavior_actortransmission [2025/03/13 17:08] (current) dragonlord
Line 1: Line 1:
 {{tag>dragonscript behavior}} {{tag>dragonscript behavior}}
 <WRAP youarehere> <WRAP youarehere>
-[[:start|Start Page]] >> [[main|DragonScript Scripting Language]] >> [[abstractions#behavior_elementsquick_and_easy_development|Behavior Elements: Quick and Easy Development]] >> **ECBehaviorActorTransmission**+[[:start|Start Page]] >> [[main|DragonScript Scripting Language]] >> [[dragengine:modules:dragonscript:abstractions|Abstraction Layers: How you want to build your Game]] >> [[dragengine:modules:dragonscript:behavior_elements|Behavior Elements]] >> **ECBehaviorActorTransmission**
 </WRAP> </WRAP>
  
Line 13: Line 13:
 For doing sub title text output conversation scripts have to be used. This allow for the highest control over the conversation. For first person only self conversation or receiving transmissions using conversation scripts can be cumbersome. For this situation this behavior provides a simpler solution. For doing sub title text output conversation scripts have to be used. This allow for the highest control over the conversation. For first person only self conversation or receiving transmissions using conversation scripts can be cumbersome. For this situation this behavior provides a simpler solution.
  
-The behavior acts similar to [[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1ConversationSystem_1_1CActionActorSpeak.html#a3eff8b891213431c4c33cb296b5c3ad1|CActionActorSpeak.executeSubTitle()]] in that it supports creating and adding a series of sub titles for an actor as if a conversation is used. Since no conversation is used the actor is free to be controlled by the player.+The behavior acts similar to #@LinkApiDocDEDS2_HTML~classDragengine_1_1ConversationSystem_1_1CActionActorSpeak.html#a3eff8b891213431c4c33cb296b5c3ad1,CActionActorSpeak.executeSubTitle()~@# in that it supports creating and adding a series of sub titles for an actor as if a conversation is used. Since no conversation is used the actor is free to be controlled by the player.
  
-This behavior uses [[behavior_conversationactor|ECBehaviorConversationActor]]. Calls [[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Scenery_1_1ECBehaviorConversationActor_1_1BehaviorConversationActor.html#afef6b6232c0c2df564a7f83a68e31f0c|createSubTitleText()]] to create sub title as if a conversation creates it. This way the same look and feel is used. Adds a listener to cause the actor to wait in conversations if such sub titles are running. This feature is by default disabled and can be enabled to avoid conversation script sub titles showing at the same time as sub titles driven by this behavior.+This behavior uses [[behavior_conversationactor|ECBehaviorConversationActor]]. Calls #@LinkApiDocDEDS2_HTML~classDragengine_1_1Scenery_1_1ECBehaviorConversationActor_1_1BehaviorConversationActor.html#afef6b6232c0c2df564a7f83a68e31f0c,createSubTitleText()~@# to create sub title as if a conversation creates it. This way the same look and feel is used. Adds a listener to cause the actor to wait in conversations if such sub titles are running. This feature is by default disabled and can be enabled to avoid conversation script sub titles showing at the same time as sub titles driven by this behavior.
  
 ====== Instance Counts ====== ====== Instance Counts ======
  
-This behavior can be added only once to an element class. While technically possible it there is no reason to use multiple transmissions since the sub titles can be styled.+This behavior can be used only once on an element.
  
 ====== Element Class Properties ====== ====== Element Class Properties ======
  
-Element class properties have the prefix **transmission.** if id is not empty.+Element class properties have the prefix ''transmission.''.
  
 ===== waitInConversation ===== ===== waitInConversation =====
 If enabled causes conversation scripts to wait for the transmission to end. If enabled causes conversation scripts to wait for the transmission to end.
-  * Full name: "transmission.waitInConversation" +  * Full name: ''transmission.waitInConversation'' 
-  * Type boolean +  * Typeboolean 
-  * Default Value false+  * Default Value: ''false''
   * Example (*.deeclass) <code xml><boolean name='transmission.waitInConversation'>true</boolean></code>   * Example (*.deeclass) <code xml><boolean name='transmission.waitInConversation'>true</boolean></code>
  
 ===== style ===== ===== style =====
 Style identifier to use. Same as style identifiers used in sub title boxes. Style identifier to use. Same as style identifiers used in sub title boxes.
-  * Full name: "transmission.style" +  * Full name: ''transmission.style'' 
-  * Type string +  * Typestring 
-  * Default Value //null//+  * Default Value: ''null''
   * Example (*.deeclass) <code xml><string name='transmission.style'>think</string></code>   * Example (*.deeclass) <code xml><string name='transmission.style'>think</string></code>
  
 ===== timeout ===== ===== timeout =====
 Timeout in seconds to display individual transmission parts. Timeout in seconds to display individual transmission parts.
-  * Full name: "transmission.timeout" +  * Full name: ''transmission.timeout'' 
-  * Type float +  * Typefloat 
-  * Default Value 5 +  * Default Value: ''5'' 
-  * Example (*.deeclass) <code xml><string name='actorIK.controllerIKHeight'>ik.height</string></code>+  * Example (*.deeclass) <code xml><string name='transmission.timeout'>ik.height</string></code> 
 + 
 +===== clearEnterConversation ===== 
 +Set clear transmission upon entering conversation. 
 +  * Full name: ''transmission.clearEnterConversation'' 
 +  * Type: boolean 
 +  * Default Value: false 
 +  * Example (*.deeclass) <code xml><boolean name='transmission.clearEnterConversation'>true</boolean></code> 
 + 
 +====== Events ====== 
 +This behavior has no events.
  
 ====== Required Behaviors ====== ====== Required Behaviors ======
Line 60: Line 70:
  
 ====== API Documentation ====== ====== API Documentation ======
-[[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Scenery_1_1ECBehaviorActorTransmission.html|ECBehaviorActorTransmission]].+#@LinkApiDocDEDS2_HTML~classDragengine_1_1Scenery_1_1ECBehaviorActorTransmission.html,ECBehaviorActorTransmission~@#.
  
-Since DragonScript Module Version **1.7**+Since DragonScript Module Version ''1.7''
  
 ====== Use Cases ====== ====== Use Cases ======
Line 112: Line 122:
 end end
 </code> </code>
 +
 +====== Behavior Factory ======
 +
 +Using element class supporting adding behaviors the behavior can be added like this:
 +<code xml>
 +<?xml version='1.0' encoding='UTF-8'?>
 +<elementClass name='MyClass' class='GenericBehaviorElement'>
 +  <behavior type='ECBehaviorComponent'/>
 +  <behavior type='ECBehaviorCollider'/>
 +  <behavior type='ECBehaviorConversationActor'/>
 +  
 +  <behavior type='ECBehaviorActorTransmission'>
 +    <!-- optional: use BaseGameApp sub title. game can add more supported values.
 +                   default is 'default' -->
 +    <string name='subTitle'>default</string>
 +    
 +    <!-- set element properties. omit property prefix if used inside behavior tag -->
 +    <float name='.timeout'>3</float>
 +  </behavior>
 +</elementClass>
 +</code>
 +
 +====== Live Examples ======
 +
 +  * [[https://github.com/LordOfDragons/deexamples|DEExamples Repository]]
 +
dragengine/modules/dragonscript/behavior_actortransmission.1636048092.txt.gz · Last modified: 2021/11/04 17:48 by dragonlord