This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dragengine:modules:dragonscript:behavior_timer [2025/05/01 14:02] – dragonlord | dragengine:modules:dragonscript:behavior_timer [2025/05/04 13:49] (current) – [timer.check] dragonlord | ||
---|---|---|---|
Line 137: | Line 137: | ||
^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
|target|'' | |target|'' | ||
- | |timer|'' | + | |timer|'' |
- | * '' | + | |
- | * '' | + | * '' |
- | * '' | + | * '' |
+ | * '' | ||
+ | </ | ||
This is an example of using this action: | This is an example of using this action: | ||
<code xml> | <code xml> | ||
<action name=' | <action name=' | ||
- | < | + | < |
+ | < | ||
</ | </ | ||
</ | </ | ||
Line 160: | Line 163: | ||
|remaining.less|float|Remaining timer time is less than value in seconds| | |remaining.less|float|Remaining timer time is less than value in seconds| | ||
|remaining.greater|float|Remaining timer time is greater than value in seconds| | |remaining.greater|float|Remaining timer time is greater than value in seconds| | ||
+ | |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 168: | Line 172: | ||
< | < | ||
</ | </ | ||
- | <!-- actions here run only if timer is running with more less than 3 seconds remaining --> | + | <!-- actions here run only if timer is running with less than 3 seconds remaining --> |
</ | </ | ||
</ | </ | ||
Line 192: | Line 196: | ||
<action name=' | <action name=' | ||
< | < | ||
- | < | + | < |
< | < | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | ====== 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 '' | ||
+ | |||
+ | ===== timer.started ===== | ||
+ | |||
+ | Timer started. | ||
+ | |||
+ | ===== timer.elapsed ===== | ||
+ | |||
+ | Timer elapsed. | ||
+ | |||
+ | ===== timer.cancelled ===== | ||
+ | |||
+ | Timer cancelled. | ||
====== Required Behaviors ====== | ====== Required Behaviors ====== | ||
Line 203: | Line 231: | ||
====== Optional Behaviors ====== | ====== Optional Behaviors ====== | ||
- | This behavior | + | * [[behavior_behaviortree|ECBehaviorBehaviorTree]]: |
+ | * [[behavior_statemachine|ECBehaviorStateMachine]]: | ||
====== Persistency ====== | ====== Persistency ====== | ||
Line 248: | Line 276: | ||
| | ||
<string name=' | <string name=' | ||
+ | | ||
+ | <!-- optional: use behavior tree with id instead of empty string --> | ||
+ | <string name=' | ||
+ | | ||
+ | <!-- optional: use state machine with id instead of empty string --> | ||
+ | <string name=' | ||
| | ||
<!-- set element properties. omit property prefix if used inside behavior tag --> | <!-- set element properties. omit property prefix if used inside behavior tag --> |