This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| dragengine:modules:dragonscript:behavior_colliderai [2026/10/09 21:39] – [State Machine Events] dragonlord | dragengine:modules:dragonscript:behavior_colliderai [2026/10/09 23:09] (current) – dragonlord | ||
|---|---|---|---|
| Line 99: | Line 99: | ||
| |stop| |Stop collider from moving. Prevents any further collision in this frame update.| | |stop| |Stop collider from moving. Prevents any further collision in this frame update.| | ||
| |sliding| |Applies sliding collision response| | |sliding| |Applies sliding collision response| | ||
| + | |hitElement.runEvent|string|If Collider has been hit and collider owner is BehaviorElement then run named event on all ECBehaviorStateMachine instance with the ECBehaviorColliderAI element as event parameter.| | ||
| This is an example of using this action: | This is an example of using this action: | ||
| Line 113: | Line 114: | ||
| ^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
| |enabled|'' | |enabled|'' | ||
| + | |hitElement| |Collider has been hit and it is owned by a BehaviorElement| | ||
| + | |hitElement.flags.set|string|Hit BehaviorElement has [[behavior_btsmflags|ECBehaviorBTSMFlags]] with named flag set. Evaluated only if '' | ||
| + | |hitElement.flags.clear|string|Hit BehaviorElement has not [[behavior_btsmflags|ECBehaviorBTSMFlags]] with named flag set. Evaluated only if '' | ||
| |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 135: | Line 139: | ||
| ^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
| |colliderAI.enabled|'' | |colliderAI.enabled|'' | ||
| + | |colliderAI.hitElement| |Collider has been hit and it is owned by a BehaviorElement| | ||
| + | |colliderAI.hitElement.flags.set|string|Hit BehaviorElement has [[behavior_btsmflags|ECBehaviorBTSMFlags]] with named flag set. Evaluated only if '' | ||
| + | |colliderAI.hitElement.flags.clear|string|Hit BehaviorElement has not [[behavior_btsmflags|ECBehaviorBTSMFlags]] with named flag set. Evaluated only if '' | ||
| This is an example of using this condition: | This is an example of using this condition: | ||
| Line 154: | Line 161: | ||
| ====== State Machine Events ====== | ====== State Machine Events ====== | ||
| - | This behavior | + | This behavior |
| - | + | ||
| - | ===== colliderAI.hitElement ===== | + | |
| - | + | ||
| - | Collider hit another BehaviorElement. | + | |
| ====== Required Behaviors ====== | ====== Required Behaviors ====== | ||