User Tools

Site Tools


dragengine:modules:dragonscript:behavior_touchsensor

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_touchsensor [2026/10/09 23:22] – dragonlorddragengine:modules:dragonscript:behavior_touchsensor [2026/11/20 16:51] (current) – [touchSensor.set] dragonlord
Line 124: Line 124:
 <action name='touchSensor.set'> <action name='touchSensor.set'>
   <parameter name='enabled'>true</parameter>   <parameter name='enabled'>true</parameter>
 +</action>
 +</code>
 +
 +===== touchSensor.update =====
 +
 +Update touch sensor.
 +
 +^Parameter^Value^Description^
 +|touching.runEvent|string|Run state machine event on all touching elements supporting [[behavior_statemachine|ECBehaviorStateMachine]]|
 +
 +This is an example of using this action:
 +<code xml>
 +<action name='touchSensor.update'>
 +  <parameter name='touching.runEvent'>effect.jump</parameter>
 </action> </action>
 </code> </code>
Line 136: Line 150:
 |count.less|integer|Count of touching elements is less than integer value| |count.less|integer|Count of touching elements is less than integer value|
 |count.greater|integer|Count of touching elements is greater than integer value| |count.greater|integer|Count of touching elements is greater than integer value|
-|eventElement.flags.set|string|Event BehaviorElement has [[behavior_btsmflags|ECBehaviorBTSMFlags]] with named flag set. Use only inside ''touchSensor.entered'' or ''touchSensor.left'' event.| 
-|eventElement.flags.clear|string|Event BehaviorElement has not [[behavior_btsmflags|ECBehaviorBTSMFlags]] with named flag set. Use only inside ''touchSensor.entered'' or ''touchSensor.left'' event.| 
 |player|''true'', ''false''|Player is touching touch sensor| |player|''true'', ''false''|Player is touching touch sensor|
 |wait| |If present action returns BTResult.running instead of BTResult.failed to wait until the checks are all fulfilled| |wait| |If present action returns BTResult.running instead of BTResult.failed to wait until the checks are all fulfilled|
Line 165: Line 177:
 |touchSensor.count.greater|integer|Count of touching elements is greater than integer value| |touchSensor.count.greater|integer|Count of touching elements is greater than integer value|
 |touchSensor.player|''true'', ''false''|Player is touching touch sensor| |touchSensor.player|''true'', ''false''|Player is touching touch sensor|
-|touchSensor.eventElement.flags.set|string|Event BehaviorElement has [[behavior_btsmflags|ECBehaviorBTSMFlags]] with named flag set. Use only inside ''touchSensor.entered'' or ''touchSensor.left'' event.| 
-|touchSensor.eventElement.flags.clear|string|Event BehaviorElement has not [[behavior_btsmflags|ECBehaviorBTSMFlags]] with named flag set. Use only inside ''touchSensor.entered'' or ''touchSensor.left'' event.| 
  
 This is an example of using this condition: This is an example of using this condition:
Line 190: Line 200:
 ===== touchSensor.entered ===== ===== touchSensor.entered =====
  
-Element entered touch sensor. Element is send as event parameter.+Element entered touch sensor. Element is send as event parameter. Use [[behavior_statemachine#eventelementupdate|eventParameter.update]] or [[behavior_statemachine#eventelementcheck|eventParameter.check]] to work with the element.
  
 ===== touchSensor.left ===== ===== touchSensor.left =====
  
-Element left touch sensor. Element is send as event parameter.+Element left touch sensor. Element is send as event parameter. Use [[behavior_statemachine#eventelementupdate|eventParameter.update]] or [[behavior_statemachine#eventelementcheck|eventParameter.check]] to work with the element.
  
 ====== Required Behaviors ====== ====== Required Behaviors ======
dragengine/modules/dragonscript/behavior_touchsensor.1791588153.txt.gz · Last modified: by dragonlord