This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dragengine:modules:dragonscript:behavior_hitscan [2025/05/02 21:33] – [Behavior Factory] dragonlord | dragengine:modules:dragonscript:behavior_hitscan [2025/05/11 13:39] (current) – dragonlord | ||
---|---|---|---|
Line 66: | Line 66: | ||
This behavior has no events | This behavior has no events | ||
+ | |||
====== Behavior Tree Actions ====== | ====== Behavior Tree Actions ====== | ||
This behavior adds these behavior tree actions if behavior tree is present. If behavior has non-empty identifier replace '' | This behavior adds these behavior tree actions if behavior tree is present. If behavior has non-empty identifier replace '' | ||
- | ===== hitScan.start ===== | + | ===== hitScan.update |
- | Start hit scans. | + | Update |
^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
- | |type|'' | + | |start|'' |
* '' | * '' | ||
* '' | * '' | ||
Line 87: | Line 88: | ||
|angle.horizontal|float|Horizontal opening angle in degrees (angle across width)| | |angle.horizontal|float|Horizontal opening angle in degrees (angle across width)| | ||
|angle.vertical|float|Vertical opening angle in degrees (angle across height)| | |angle.vertical|float|Vertical opening angle in degrees (angle across height)| | ||
+ | |stop|empty string, '' | ||
This is an example of using this action: | This is an example of using this action: | ||
<code xml> | <code xml> | ||
- | <action name=' | + | <action name=' |
- | < | + | < |
< | < | ||
< | < | ||
- | </ | ||
- | </ | ||
- | |||
- | ===== hitScan.stop ===== | ||
- | |||
- | Stop hit scans. | ||
- | |||
- | ^Parameter^Value^Description^ | ||
- | |clear| |Clear hit results as if no hit has been done| | ||
- | |||
- | This is an example of using this action: | ||
- | <code xml> | ||
- | <action name=' | ||
- | < | ||
</ | </ | ||
</ | </ | ||
Line 123: | Line 111: | ||
|hits.percentage.less|integer|Percentage of hits is less than value in the range from 0 to 1| | |hits.percentage.less|integer|Percentage of hits is less than value in the range from 0 to 1| | ||
|hits.percentage.greater|integer|Percentage of hits is greater than value in the range from 0 to 1| | |hits.percentage.greater|integer|Percentage of hits is greater than value in the range from 0 to 1| | ||
+ | |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 160: | Line 149: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | ====== State Machine Actions ====== | ||
+ | |||
+ | Same as [[# | ||
+ | |||
+ | ====== State Machine Conditions ====== | ||
+ | |||
+ | Same as [[# | ||
+ | |||
+ | ====== State Machine Events ====== | ||
+ | |||
+ | This behavior sends these state machine events. If behavior has non-empty identifier replace '' | ||
+ | |||
+ | ===== hitScan.done ===== | ||
+ | |||
+ | Hit scan finished and the results can be examine now. | ||
====== Required Behaviors ====== | ====== Required Behaviors ====== | ||
Line 169: | Line 174: | ||
* [[behavior_component|ECBehaviorComponent]]: | * [[behavior_component|ECBehaviorComponent]]: | ||
* [[behavior_behaviortree|ECBehaviorBehaviorTree]]: | * [[behavior_behaviortree|ECBehaviorBehaviorTree]]: | ||
+ | * [[behavior_statemachine|ECBehaviorStateMachine]]: | ||
====== Persistency ====== | ====== Persistency ====== |