This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dragengine:modules:dragonscript:behavior_actormover [2025/03/12 19:38] – [Required Behaviors] dragonlord | dragengine:modules:dragonscript:behavior_actormover [2025/05/04 13:43] (current) – [actorMover.check] dragonlord | ||
---|---|---|---|
Line 1: | Line 1: | ||
{{tag> | {{tag> | ||
<WRAP youarehere> | <WRAP youarehere> | ||
- | [[: | + | [[: |
</ | </ | ||
Line 135: | Line 135: | ||
|direct|Use distance between actor and goal position as test distance.| | |direct|Use distance between actor and goal position as test distance.| | ||
|distance|Distance to test against.| | |distance|Distance to test against.| | ||
+ | |||
+ | ====== Behavior Tree Actions ====== | ||
+ | |||
+ | This behavior adds these behavior tree actions if behavior tree is present. | ||
+ | |||
+ | ===== actorMover.set ===== | ||
+ | |||
+ | Set one or more actor mover parameters. | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |limit.turnAngle|float|Limit turn angle in degrees| | ||
+ | |limit.turnAngle.enabled|'' | ||
+ | |speed|float|Movement speed in m/s| | ||
+ | |paused|'' | ||
+ | |||
+ | This is an example of using this action: | ||
+ | <code xml> | ||
+ | <action name=' | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== actorMover.stop ===== | ||
+ | |||
+ | Stop moving. | ||
+ | |||
+ | This is an example of using this action: | ||
+ | <code xml> | ||
+ | <action name=' | ||
+ | </ | ||
+ | |||
+ | ===== actorMover.check ===== | ||
+ | |||
+ | Check one or more actor mover parameters. Action succeeds if all parameter value matches their respective actor mover parameter otherwise action fails. This action is typically used as first action in a sequence to run the sequence only if a actor mover parameter matches (or not). | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |goal|'' | ||
+ | |goal.distance.less|float|Distance to goal along path is less than value in meters| | ||
+ | |goal.distance.greater|float|Distance to goal along path is greater than value in meters| | ||
+ | |limit.turnAngle.enabled|'' | ||
+ | |limit.turnAngle.less|float|Limit turn angle is less than value degrees| | ||
+ | |limit.turnAngle.greater|float|Limit turn angle is greater than value degrees| | ||
+ | |speed.less|float|Speed is less than value m/s| | ||
+ | |speed.greater|float|Speed is greater than value m/s| | ||
+ | |paused|'' | ||
+ | |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: | ||
+ | <code xml> | ||
+ | < | ||
+ | <action name=' | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | <!-- actions here run only if actor mover has goal set and actor is less than 3 meters near to it --> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====== Behavior Tree Conditions ====== | ||
+ | |||
+ | This behavior adds these behavior tree conditions if behavior tree is present. | ||
+ | |||
+ | ===== actorMover.check ===== | ||
+ | |||
+ | Check one or more actor mover parameters. Conditions returns true if all parameter value match their respective actor mover parameter. This condition is typically used to run an action or sequence of actions as long as actor mover conditions are true. | ||
+ | |||
+ | ^Parameter^Value^Description^ | ||
+ | |actorMover.goal|'' | ||
+ | |actorMover.goal.distance.less|float|Distance to goal along path is less than value in meters| | ||
+ | |actorMover.goal.distance.greater|float|Distance to goal along path is greater than value in meters| | ||
+ | |actorMover.limit.turnAngle.enabled|'' | ||
+ | |actorMover.limit.turnAngle.less|float|Limit turn angle is less than value degrees| | ||
+ | |actorMover.limit.turnAngle.greater|float|Limit turn angle is greater than value degrees| | ||
+ | |actorMover.speed.less|float|Speed is less than value m/s| | ||
+ | |actorMover.speed.greater|float|Speed is greater than value m/s| | ||
+ | |actorMover.paused|'' | ||
+ | |||
+ | This is an example of using this condition: | ||
+ | <code xml> | ||
+ | <action name=' | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====== State Machine Actions ====== | ||
+ | |||
+ | Same as [[# | ||
+ | |||
+ | ====== State Machine Conditions ====== | ||
+ | |||
+ | Same as [[# | ||
+ | |||
+ | ====== State Machine Events ====== | ||
+ | |||
+ | This behavior sends these state machine events. | ||
+ | |||
+ | ===== actorMover.start ===== | ||
+ | |||
+ | Actor starts moving towards goal. Path can be null if no path could be found or the actor is already at the goal. In this case '' | ||
+ | |||
+ | ===== actorMover.stop ===== | ||
+ | |||
+ | Actor stops moving. | ||
+ | |||
+ | ===== actorMover.arrived ===== | ||
+ | |||
+ | Actor arrived at goal position. '' | ||
====== Required Behaviors ====== | ====== Required Behaviors ====== | ||
Line 143: | Line 252: | ||
====== Optional Behaviors ====== | ====== Optional Behaviors ====== | ||
- | This behavior does support these optional behaviors: | ||
* [[behavior_rideon|ECBehaviorRideOn]] | * [[behavior_rideon|ECBehaviorRideOn]] | ||
* [[behavior_conversationactor|ECBehaviorConversationActor]]: | * [[behavior_conversationactor|ECBehaviorConversationActor]]: | ||
+ | * [[behavior_behaviortree|ECBehaviorBehaviorTree]]: | ||
+ | * [[behavior_statemachine|ECBehaviorStateMachine]]: | ||
====== Persistency ====== | ====== Persistency ====== | ||
Line 209: | Line 319: | ||
<!-- optional: use navigator with id instead of empty string --> | <!-- optional: use navigator with id instead of empty string --> | ||
<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 --> |