User Tools

Site Tools


dragengine:modules:dragonscript:behavior_forcefield

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_forcefield [2025/04/30 21:50] – [forceField.set] dragonlorddragengine:modules:dragonscript:behavior_forcefield [2025/05/12 21:26] (current) dragonlord
Line 180: Line 180:
  
 ^Parameter^Value^Description^ ^Parameter^Value^Description^
-|enabled|true,false|Force field is enabled or not|+|enabled|''true''''false''|Force field is enabled 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 201: Line 202:
  
 ^Parameter^Value^Description^ ^Parameter^Value^Description^
-|forceField.enabled|true,false|Force field is enabled or not|+|forceField.enabled|''true''''false''|Force field is enabled or not|
  
 This is an example of using this condition: This is an example of using this condition:
Line 210: Line 211:
 </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. If behavior has non-empty identifier replace ''forceField'' with ''forceField(id)''.
 +
 +===== forceField.enabled =====
 +
 +Force field has been enabled.
 +
 +===== forceField.disabled =====
 +
 +Force field has been disabled.
  
 ====== Required Behaviors ====== ====== Required Behaviors ======
Line 218: Line 239:
  
   * [[behavior_collider|ECBehaviorCollider]]: Attach force field to collider.   * [[behavior_collider|ECBehaviorCollider]]: Attach force field to collider.
 +  * [[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 282: Line 306:
     <string name='trigger.synchronize'>other</string>     <string name='trigger.synchronize'>other</string>
          
-    <!-- optional: use behavior tree with id instead of empty string --> +    <!-- optional: add behavior trees. default adds all behavior trees. --> 
-    <string name='behaviorTree'>second</string>+    <list name='behaviorTrees'> 
 +      <string/> <!-- add behavior with empty identifier --> 
 +      <string>default</string> <!-- add behavior with 'default' identifier --> 
 +    </list> 
 +     
 +    <!-- optional: add state machines. default adds all state machines. --> 
 +    <list name='stateMachines'> 
 +      <string/> <!-- add behavior with empty identifier --> 
 +      <string>default</string> <!-- add behavior with 'default' identifier --> 
 +    </list>
          
     <!-- 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_forcefield.1746049834.txt.gz · Last modified: 2025/04/30 21:50 by dragonlord