User Tools

Site Tools


dragengine:modules:dragonscript:behavior_actoraiaction

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
dragengine:modules:dragonscript:behavior_actoraiaction [2025/03/11 19:04] – created dragonlorddragengine:modules:dragonscript:behavior_actoraiaction [2025/05/06 16:14] (current) – [aiAction.set] dragonlord
Line 1: Line 1:
 {{tag>dragonscript behavior}} {{tag>dragonscript behavior}}
 <WRAP youarehere> <WRAP youarehere>
-[[:start|Start Page]] >> [[main|DragonScript Scripting Language]] >> [[abstractions#behavior_elementsquick_and_easy_development|Behavior Elements: Quick and Easy Development]] >> **ECBehaviorActorAIAction**+[[:start|Start Page]] >> [[main|DragonScript Scripting Language]] >> [[dragengine:modules:dragonscript:abstractions|Abstraction Layers: How you want to build your Game]] >> [[dragengine:modules:dragonscript:behavior_elements|Behavior Elements]] >> **ECBehaviorActorAIAction**
 </WRAP> </WRAP>
  
Line 23: Line 23:
 Element class properties have the prefix ''aiAction.''. Element class properties have the prefix ''aiAction.''.
  
-===== Events =====+====== Events ======
  
 Since this behavior provides no support to apply the chosen color listening is used. Behaviors knowing how to apply the color add a listener and are notified if the color changes. These events can be received: Since this behavior provides no support to apply the chosen color listening is used. Behaviors knowing how to apply the color add a listener and are notified if the color changes. These events can be received:
 +
 +====== Behavior Tree Actions ======
 +
 +This behavior adds these behavior tree actions if behavior tree is present.
 +
 +===== aiAction.set =====
 +
 +Set one or more actor ai/action parameters.
 +
 +^Parameter^Value^Description^
 +|ai.behaviorTree|string|Set AI using BAAIBehaviorTree with behavior tree loaded from value path. Path can be relative to behavior tree file containing this action|
 +|action.stateMachine|string|Set Action using BAAStateMachine with state machine loaded from value path. Path can be relative to behavior tree or state machine file containing this action|
 +
 +This is an example of using this action:
 +<code xml>
 +<action name='aiAction.set'>
 +  <parameter name='ai.behaviorTree'>/content/ai/patrol.debt</parameter>
 +  <parameter name='action.stateMachine'>/content/action/human.desm</parameter>
 +</action>
 +</code>
  
 ====== Required Behaviors ====== ====== Required Behaviors ======
Line 33: Line 53:
 ====== Optional Behaviors ====== ====== Optional Behaviors ======
  
-This behavior does support these optional behaviors: 
   * [[behavior_colliderai|ECBehaviorColliderAI]]: Listen to events processing them with actions.   * [[behavior_colliderai|ECBehaviorColliderAI]]: Listen to events processing them with actions.
   * [[behavior_conversationactor|ECBehaviorConversationActor]]: Add conversation commands and conditions.   * [[behavior_conversationactor|ECBehaviorConversationActor]]: Add conversation commands and conditions.
   * [[behavior_playercontrollable|ECBehaviorPlayerControllable]]: Listen to events processing them with actions.   * [[behavior_playercontrollable|ECBehaviorPlayerControllable]]: Listen to events processing them with actions.
 +  * [[behavior_behaviortree|ECBehaviorBehaviorTree]]: Add actions and conditions for behavior trees to use.
  
 ====== Persistency ====== ====== Persistency ======
Line 90: Line 110:
   <behavior type='ECBehaviorActorAIAction'>   <behavior type='ECBehaviorActorAIAction'>
     <!-- behavior factory automatically assigns all optional behaviors if present -->     <!-- behavior factory automatically assigns all optional behaviors if present -->
 +    
 +    <!-- optional: use behavior tree with id instead of empty string -->
 +    <string name='behaviorTree'>second</string>
          
     <!-- set element properties. omit property prefix if used inside behavior tag -->     <!-- set element properties. omit property prefix if used inside behavior tag -->
dragengine/modules/dragonscript/behavior_actoraiaction.1741719883.txt.gz · Last modified: 2025/03/11 19:04 by dragonlord