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:29] – [Behavior Tree Actions] dragonlorddragengine:modules:dragonscript:behavior_touching [2025/05/02 15:30] (current) – [Behavior Tree Actions] dragonlord
Line 59: Line 59:
 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 this action:+This is an example of using touch sensor behavior tree actions:
 <code xml> <code xml>
 <action name='touching.touchSensor.set'> <action name='touching.touchSensor.set'>
   <parameter name='enabled'>true</parameter>   <parameter name='enabled'>true</parameter>
 </action> </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> </code>
  
Line 69: Line 78:
  
 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.1746199770.txt.gz · Last modified: 2025/05/02 15:29 by dragonlord