User Tools

Site Tools


dragengine:modules:dragonscript:behavior_touching

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_touching [2025/05/02 15:28] – [Behavior Tree Conditions] dragonlorddragengine:modules:dragonscript:behavior_touching [2025/05/02 15:30] (current) – [Behavior Tree Actions] dragonlord
Line 58: Line 58:
  
 The [[behavior_touchsensor|ECBehaviorTouchSensor]] behavior adds behavior tree actions if behavior tree is present. See [[behavior_touchsensor#behavior_tree_actions|ECBehaviorTouchSensor Behavior Tree Actions]]. Replace ''touchSensor'' with ''touching.touchSensor'' or ''touching(id).touchSensor''. The [[behavior_touchsensor|ECBehaviorTouchSensor]] behavior adds behavior tree actions if behavior tree is present. See [[behavior_touchsensor#behavior_tree_actions|ECBehaviorTouchSensor Behavior Tree Actions]]. Replace ''touchSensor'' with ''touching.touchSensor'' or ''touching(id).touchSensor''.
 +
 +This is an example of using touch sensor behavior tree actions:
 +<code xml>
 +<action name='touching.touchSensor.set'>
 +  <parameter name='enabled'>true</parameter>
 +</action>
 +</code>
 +
 +<code xml>
 +<sequence>
 +  <action name='touching.touchSensor.check'>
 +    <parameter name='player'>true</parameter>
 +  </action>
 +  <!-- actions here run only if player is touching touch sensor -->
 +</sequence>
 +</code>
  
 ====== Behavior Tree Conditions ====== ====== Behavior Tree Conditions ======
  
 The [[behavior_touchsensor|ECBehaviorTouchSensor]] behavior adds behavior tree conditions if behavior tree is present. See [[behavior_touchsensor#behavior_tree_conditions|ECBehaviorTouchSensor Behavior Tree Conditions]]. Replace ''touchSensor'' with ''touching.touchSensor'' or ''touching(id).touchSensor''. The [[behavior_touchsensor|ECBehaviorTouchSensor]] behavior adds behavior tree conditions if behavior tree is present. See [[behavior_touchsensor#behavior_tree_conditions|ECBehaviorTouchSensor Behavior Tree Conditions]]. Replace ''touchSensor'' with ''touching.touchSensor'' or ''touching(id).touchSensor''.
 +
 +This is an example of using touch sensor behavior tree conditions:
 +<code xml>
 +<action name='myAction' id='doing something'>
 +  <parameter name='touching.touchSensor.player'>true</parameter>
 +  <condition>touching.touchSensor.check</condition>
 +</action>
 +</code>
  
 ====== Required Behaviors ====== ====== Required Behaviors ======
dragengine/modules/dragonscript/behavior_touching.1746199716.txt.gz · Last modified: 2025/05/02 15:28 by dragonlord