User Tools

Site Tools


dragengine:modules:dragonscript:behavior_conversation

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_conversation [2025/03/13 17:11] dragonlorddragengine:modules:dragonscript:behavior_conversation [2025/09/15 10:24] (current) – [Behavior Tree Actions] dragonlord
Line 40: Line 40:
 It checks if a behavior element has the ECBehaviorConversation behavior present. If this is the case it checks if the conversation can be started and starts it. It checks if a behavior element has the ECBehaviorConversation behavior present. If this is the case it checks if the conversation can be started and starts it.
  
-Another way to start a conversation is using the triggerConversation. If this trigger  expression is not empty it will be used to start the conversation if the trigger expression evaluates to true. The method canStartConversation() is used to not check if the conversation is possible. If the check fails an exception is thrown to not silently not start a conversation.+Another way to start a conversation is using the triggerConversation. If this trigger  expression is not empty it will be used to start the conversation if the trigger expression evaluates to true. The method canStartConversation() is used to check if the conversation is possible. If the check fails an exception is thrown to not silently not start a conversation.
  
 This method is typically used to trigger conversation if the player enters a TriggerTouch or he finished a sequence of actions ending in firing a trigger. This method is typically used to trigger conversation if the player enters a TriggerTouch or he finished a sequence of actions ending in firing a trigger.
Line 86: Line 86:
  
 ===== topic ===== ===== topic =====
-Set topic.+Set topic. Using simple conversation this is the snippet identifier.
   * Full name: ''customColor.topic'' or ''customColor({id}).topic''   * Full name: ''customColor.topic'' or ''customColor({id}).topic''
   * Type: string   * Type: string
Line 109: Line 109:
  
 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.
 +
 +===== conversation.start =====
 +
 +Start conversation. Behavior tree will not run while the actor owning this behavior is part of the conversation. After the actor left the conversation the behavior tree continues with the next action.
 +
 +This is an example of using this action:
 +<code xml>
 +<action name='conversation.start'/>
 +</code>
  
 ====== Required Behaviors ====== ====== Required Behaviors ======
Line 159: Line 172:
                    default is 'default' -->                    default is 'default' -->
     <string name='triggerTable'>default</string>     <string name='triggerTable'>default</string>
 +    
 +    <!-- optional: identifier of ECBehaviorTriggered to synchronize with or empty
 +                   string to not synchronize. default is empty string. -->
 +    <string name='trigger.synchronize'>other</string>
          
     <!-- optional: use BaseGameApp player controllable actor.     <!-- optional: use BaseGameApp player controllable actor.
dragengine/modules/dragonscript/behavior_conversation.1741885910.txt.gz · Last modified: 2025/03/13 17:11 by dragonlord