User Tools

Site Tools


dragengine:modules:dragonscript:behavior_triggered

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_triggered [2025/05/01 14:19] dragonlorddragengine:modules:dragonscript:behavior_triggered [2025/05/04 13:50] (current) – [trigger.check] dragonlord
Line 39: Line 39:
 ====== Behavior Tree Actions ====== ====== Behavior Tree Actions ======
  
-This behavior adds these behavior tree actions if behavior tree is present. If behavior has non-empty identifier replace ''trigger'' with ''trigger(id)''.+This behavior adds these behavior tree actions if behavior tree is present. Replace ''trigger'' by the value of ''propertyName'' if used.
  
 ===== trigger.check ===== ===== trigger.check =====
Line 47: Line 47:
 ^Parameter^Value^Description^ ^Parameter^Value^Description^
 |state|''true'', ''false''|Trigger expression evaluates to true or false| |state|''true'', ''false''|Trigger expression evaluates to true or false|
 +|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: This is an example of using this action:
Line 60: Line 61:
 ====== Behavior Tree Conditions ====== ====== Behavior Tree Conditions ======
  
-This behavior adds these behavior tree conditions if behavior tree is present. If behavior has non-empty identifier replace ''trigger'' with ''trigger(id)''.+This behavior adds these behavior tree conditions if behavior tree is present. Replace ''trigger'' by the value of ''propertyName'' if used.
  
 ===== trigger.check ===== ===== trigger.check =====
Line 76: Line 77:
 </action> </action>
 </code> </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. Replace ''trigger'' by the value of ''propertyName'' if used.
 +
 +===== trigger.true =====
 +
 +Trigger expression changed to true.
 +
 +===== trigger.false =====
 +
 +Trigger expression changed to false.
  
 ====== Required Behaviors ====== ====== Required Behaviors ======
Line 83: Line 104:
 ====== 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 ======
Line 130: Line 152:
                    string to not synchronize. default is empty string. -->                    string to not synchronize. default is empty string. -->
     <string name='synchronize'>other</string>     <string name='synchronize'>other</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>
   </behavior>   </behavior>
      
dragengine/modules/dragonscript/behavior_triggered.1746109199.txt.gz · Last modified: 2025/05/01 14:19 by dragonlord