User Tools

Site Tools


dragengine:modules:dragonscript:behavior_attachable

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_attachable [2025/05/02 10:42] dragonlorddragengine:modules:dragonscript:behavior_attachable [2025/05/04 13:45] (current) – [attachable.check] dragonlord
Line 34: Line 34:
  
 Attachable has been removed from slot. Attachable has been removed from slot.
 +
 ====== Behavior Tree Actions ====== ====== Behavior Tree Actions ======
  
Line 58: Line 59:
 ^Parameter^Value^Description^ ^Parameter^Value^Description^
 |attached|''true'', ''false''|Element is attached to an attach slot or not| |attached|''true'', ''false''|Element is attached to an attach slot or not|
 +|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 87: Line 89:
 </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.
 +
 +===== attachable.attached =====
 +
 +Attachable has been attached to slot.
 +
 +===== attachable.detached =====
 +
 +Attachable has been removed from slot.
  
 ====== Required Behaviors ====== ====== Required Behaviors ======
Line 95: Line 117:
  
   * [[behavior_behaviortree|ECBehaviorBehaviorTree]]: Add actions and conditions for behavior trees to use.   * [[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 137: Line 160:
      
   <behavior type='ECBehaviorAttachable'>   <behavior type='ECBehaviorAttachable'>
 +    <!-- 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 -->
     <string name='.name'>value</string>     <string name='.name'>value</string>
dragengine/modules/dragonscript/behavior_attachable.1746182565.txt.gz · Last modified: 2025/05/02 10:42 by dragonlord