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

Both sides previous revisionPrevious revision
Next revision
Previous revision
dragengine:modules:dragonscript:behavior_actortransmission [2025/03/11 23:20] dragonlorddragengine:modules:dragonscript:behavior_actortransmission [2025/05/11 13:12] (current) – [actorTransmission.transmission] 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 54: Line 54:
  
 ====== Events ====== ====== Events ======
 +
 This behavior has no events. This behavior has no events.
 +
 +====== Behavior Tree Actions ======
 +
 +This behavior adds these behavior tree actions if behavior tree is present. If behavior has non-empty identifier replace ''actorTransmission'' with ''actorTransmission(id)''.
 +
 +===== actorTransmission.set =====
 +
 +Set one or more actor transmission parameters.
 +
 +^Parameter^Value^Description^
 +|waitInConversation|''true'', ''false''|Enable wait in conversation|
 +|clearEnterConversation|''true'', ''false''|Clear transmission on enter conversation|
 +
 +This is an example of using this action:
 +<code xml>
 +<action name='actorTransmission.set'>
 +  <parameter name='waitInConversation'>true</parameter>
 +</action>
 +</code>
 +
 +===== actorTransmission.update =====
 +
 +Update transmission.
 +
 +^Parameter^Value^Description^
 +|skip| |Skip current transmission part and show the next part if present|
 +|clear| |Clear all transmission parts|
 +|pause|float|Add a pause to the transmission|
 +|text|string|Add text part to transmission|
 +|text.style|string|Style to use for text. If absent uses style set in behavior|
 +|text.timeout|float|Time in seconds to display text. If absent uses timeout set in behavior|
 +
 +This is an example of using this action:
 +<code xml>
 +<action name='actorTransmission.update'>
 +  <parameter name='clear'/>
 +  <parameter name='text'>Text shown to the player in a transmission box.</parameter>
 +</action>
 +</code>
 +
 +===== actorTransmission.check =====
 +
 +Check one or more actor transmission parameters. Action succeeds if all parameter value matches their respective actor transmission parameter otherwise action fails. This action is typically used as first action in a sequence to run the sequence only if a actor transmission parameter matches (or not).
 +
 +^Parameter^Value^Description^
 +|waitInConversation|''true'', ''false''|Wait in conversation is enabled|
 +|clearEnterConversation|''true'', ''false''|Clear transmission on enter conversation|
 +|running|''true'', ''false''|Transmission is running|
 +|parts.less|integer|Count of remaining parts in transmission is less than integer value|
 +|parts.greater|integer|Count of remaining parts in transmission is greater than integer value|
 +|remainingDisplayTime.less|float|Remaining part display time is less than value seconds|
 +|remainingDisplayTime.greater|float|Remaining part display time is greater than value seconds|
 +|wait| |If present action returns BTResult.running instead of BTResult.failed to wait until the checks are all fulfilled|
 +
 +This is an example of using this action:
 +<code xml>
 +<sequence>
 +  <action name='actorTransmission.check'>
 +    <parameter name='running'>true</parameter>
 +    <parameter name='remainingDisplayTime.less'>3</parameter>
 +  </action>
 +  <!-- actions here run only if transmission is running with less than 3 seconds remaining for the current part -->
 +</sequence>
 +</code>
 +
 +====== Behavior Tree Conditions ======
 +
 +This behavior adds these behavior tree conditions if behavior tree is present. If behavior has non-empty identifier replace ''actorTransmission'' with ''actorTransmission(id)''.
 +
 +===== actorTransmission.check =====
 +
 +Check one or more actor transmission parameters. Conditions returns true if all parameter value match their respective actor transmission parameter. This condition is typically used to run an action or sequence of actions as long as actor transmission conditions are true.
 +
 +^Parameter^Value^Description^
 +|actorTransmission.waitInConversation|''true'', ''false''|Wait in conversation is enabled|
 +|actorTransmission.clearEnterConversation|''true'', ''false''|Clear transmission on enter conversation|
 +|actorTransmission.running|''true'', ''false''|Transmission is running|
 +|actorTransmission.parts.less|integer|Count of remaining parts in transmission is less than integer value|
 +|actorTransmission.parts.greater|integer|Count of remaining parts in transmission is greater than integer value|
 +|actorTransmission.remainingDisplayTime.less|float|Remaining part display time is less than value seconds|
 +|actorTransmission.remainingDisplayTime.greater|float|Remaining part display time is greater than value seconds|
 +
 +This is an example of using this condition:
 +<code xml>
 +<action name='myAction' id='doing something'>
 +  <parameter name='actorTransmissionrunning'>true</parameter>
 +  <parameter name='actorTransmissionremainingDisplayTime.less'>3</parameter>
 +  <condition>actorTransmission.check</condition>
 +</action>
 +</code>
 +
 +====== State Machine Actions ======
 +
 +Same as [[#behavior_tree_actions|Behavior Tree Actions]].
 +
 +====== State Machine Conditions ======
 +
 +Same as [[#behavior_tree_conditions|Behavior Tree Conditions]].
 +
 +====== State Machine Events ======
 +
 +This behavior sends these state machine events. If behavior has non-empty identifier replace ''actorTransmission'' with ''actorTransmission(id)''.
 +
 +===== actorTransmission.start =====
 +
 +Transmission started. Send if a pause or text part is added while the part count is 0.
 +
 +===== actorTransmission.part =====
 +
 +Next part in a transmission is shown.
 +
 +===== actorTransmission.finished =====
 +
 +Last part in the transmission finished.
  
 ====== Required Behaviors ====== ====== Required Behaviors ======
 +
   * [[behavior_conversationactor|ECBehaviorConversationActor]]   * [[behavior_conversationactor|ECBehaviorConversationActor]]
  
 ====== Optional Behaviors ====== ====== Optional Behaviors ======
-This behavior does not support optional behaviors.+ 
 +  * [[behavior_behaviortree|ECBehaviorBehaviorTree]]: Add actions and conditions for behavior trees to use. 
 +  * [[behavior_statemachine|ECBehaviorStateMachine]]: Add actions and conditions for state machine to use and events to send to the state machine.
  
 ====== Persistency ====== ====== Persistency ======
 +
 This behavior supports persistency. These parameters are persisted: This behavior supports persistency. These parameters are persisted:
   * Wait in conversation flag   * Wait in conversation flag
Line 137: Line 256:
                    default is 'default' -->                    default is 'default' -->
     <string name='subTitle'>default</string>     <string name='subTitle'>default</string>
 +    
 +    <!-- optional: use behavior tree with id instead of empty string -->
 +    <string name='behaviorTree'>second</string>
 +    
 +    <!-- optional: use state machine with id instead of empty string -->
 +    <string name='stateMachine'>second</string>
          
     <!-- set element properties. omit property prefix if used inside behavior tag -->     <!-- set element properties. omit property prefix if used inside behavior tag -->
dragengine/modules/dragonscript/behavior_actortransmission.1741735241.txt.gz · Last modified: 2025/03/11 23:20 by dragonlord