This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dragengine:modules:dragonscript:behavior_announcer [2025/05/01 10:53] – dragonlord | dragengine:modules:dragonscript:behavior_announcer [2025/05/11 13:44] (current) – [announcer.announce] dragonlord | ||
|---|---|---|---|
| Line 157: | Line 157: | ||
| 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 '' | ||
| - | ===== announcer.announce | + | ===== announcer.update |
| - | Start or stop announcing. | + | Update announcer. |
| ^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
| |text|string|Text to announce. If not set uses the last text.| | |text|string|Text to announce. If not set uses the last text.| | ||
| |text.translate|string|Text to announce using TranslationManager to look up translation entry. If not set uses the last text.| | |text.translate|string|Text to announce using TranslationManager to look up translation entry. If not set uses the last text.| | ||
| - | |stop||If present stop announcement instead of starting it| | + | |stop| |If present stop announcement instead of starting it| |
| 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 179: | Line 179: | ||
| ^Parameter^Value^Description^ | ^Parameter^Value^Description^ | ||
| |announcing|'' | |announcing|'' | ||
| + | |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 208: | Line 209: | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | ====== 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 '' | ||
| + | |||
| + | ===== announcer.start ===== | ||
| + | |||
| + | Start playing back announcement. | ||
| + | |||
| + | ===== announcer.stop ===== | ||
| + | |||
| + | Stop playing back announcement. | ||
| ====== Required Behaviors ====== | ====== Required Behaviors ====== | ||
| Line 216: | Line 237: | ||
| * [[behavior_collider|ECBehaviorCollider]]: | * [[behavior_collider|ECBehaviorCollider]]: | ||
| + | * [[behavior_behaviortree|ECBehaviorBehaviorTree]]: | ||
| + | * [[behavior_statemachine|ECBehaviorStateMachine]]: | ||
| ====== Persistency ====== | ====== Persistency ====== | ||
| Line 268: | Line 291: | ||
| | | ||
| <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 --> | ||