User Tools

Site Tools


dragengine:modules:dragonscript:behaviortrees

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
dragengine:modules:dragonscript:behaviortrees [2026/10/09 20:34] – [File Format (*.debt)] dragonlorddragengine:modules:dragonscript:behaviortrees [2026/10/09 20:37] (current) – dragonlord
Line 238: Line 238:
   * ''allFalse'': All conditions have to evaluate to false.   * ''allFalse'': All conditions have to evaluate to false.
 </WRAP>|0..1|''allTrue''| </WRAP>|0..1|''allTrue''|
 +|conditionGroup|Add condition group. Allows to create complex, nested conditions.|0..N|-|
  
 ===== sequence ===== ===== sequence =====
Line 259: Line 260:
   * ''allFalse'': All conditions have to evaluate to false.   * ''allFalse'': All conditions have to evaluate to false.
 </WRAP>|0..1|''allTrue''| </WRAP>|0..1|''allTrue''|
 +|conditionGroup|Add condition group. Allows to create complex, nested conditions.|0..N|-|
 |action|Add action rule|0..N|-| |action|Add action rule|0..N|-|
 |sequence|Add sequence rule|0..N|-| |sequence|Add sequence rule|0..N|-|
Line 288: Line 290:
   * ''allFalse'': All conditions have to evaluate to false.   * ''allFalse'': All conditions have to evaluate to false.
 </WRAP>|0..1|''allTrue''| </WRAP>|0..1|''allTrue''|
 +|conditionGroup|Add condition group. Allows to create complex, nested conditions.|0..N|-|
 |action|Add action rule|0..N|-| |action|Add action rule|0..N|-|
 |sequence|Add sequence rule|0..N|-| |sequence|Add sequence rule|0..N|-|
Line 312: Line 315:
   * ''allFalse'': All conditions have to evaluate to false.   * ''allFalse'': All conditions have to evaluate to false.
 </WRAP>|0..1|''allTrue''| </WRAP>|0..1|''allTrue''|
 +|conditionGroup|Add condition group. Allows to create complex, nested conditions.|0..N|-|
  
 ===== failure ===== ===== failure =====
Line 328: Line 332:
   * ''allFalse'': All conditions have to evaluate to false.   * ''allFalse'': All conditions have to evaluate to false.
 </WRAP>|0..1|''allTrue''| </WRAP>|0..1|''allTrue''|
 +|conditionGroup|Add condition group. Allows to create complex, nested conditions.|0..N|-|
  
 ===== running ===== ===== running =====
Line 347: Line 352:
   * ''allFalse'': All conditions have to evaluate to false.   * ''allFalse'': All conditions have to evaluate to false.
 </WRAP>|0..1|''allTrue''| </WRAP>|0..1|''allTrue''|
 +|conditionGroup|Add condition group. Allows to create complex, nested conditions.|0..N|-|
  
 ===== yield ===== ===== yield =====
Line 366: Line 372:
   * ''allFalse'': All conditions have to evaluate to false.   * ''allFalse'': All conditions have to evaluate to false.
 </WRAP>|0..1|''allTrue''| </WRAP>|0..1|''allTrue''|
 +|conditionGroup|Add condition group. Allows to create complex, nested conditions.|0..N|-|
  
 ====== Examples ====== ====== Examples ======
Line 543: Line 550:
  <failure/> which always fails.  <failure/> which always fails.
  -->  -->
 + <success/>
 + </choice>
 +</behaviorTree>
 +</code>
 +
 +This example shows the use of condition groups to create complex, nested conditions. The checked condition represents this expression: ''isSitOn or (not inConversation and not inTransition)''.
 +
 +<code xml><?xml version='1.0' encoding='ISO-8859-1'?>
 +<behaviorTree>
 + <choice id='root'>
 + <action id='wander' name='wander'>
 + <conditionMode>any</conditionMode>
 +
 + <conditionGroup>
 + <condition>sitOn.check</condition>
 + <parameter name='isSitOn'>true</parameter>
 + </conditionGroup>
 +
 + <conditionGroup>
 + <condition>conversation.check</condition>
 + <parameter name='inConversation'>false</parameter>
 +
 + <condition>action.check</condition>
 + <parameter name='inTransition'>false</parameter>
 + </conditionGroup>
 + </action>
  <success/>  <success/>
  </choice>  </choice>
dragengine/modules/dragonscript/behaviortrees.txt · Last modified: by dragonlord