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

Both sides previous revisionPrevious revision
Next revision
Previous revision
dragengine:modules:dragonscript:behavior_actoraiaction [2025/05/06 16:14] – [aiAction.set] dragonlorddragengine:modules:dragonscript:behavior_actoraiaction [2025/05/11 13:41] (current) – [aiAction.notify] dragonlord
Line 38: Line 38:
 |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| |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| |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|
 +|action.conversationWait|''true'', ''false''|Set if conversation waits due to active action|
  
 This is an example of using this action: This is an example of using this action:
Line 44: Line 45:
   <parameter name='ai.behaviorTree'>/content/ai/patrol.debt</parameter>   <parameter name='ai.behaviorTree'>/content/ai/patrol.debt</parameter>
   <parameter name='action.stateMachine'>/content/action/human.desm</parameter>   <parameter name='action.stateMachine'>/content/action/human.desm</parameter>
 +</action>
 +</code>
 +
 +===== aiAction.update =====
 +
 +Update AI/Action.
 +
 +^Parameter^Value^Description^
 +|ai.actionFinished|''success'', ''failure''|If actor is not player controlled calls actionFinished() or actionFailed() on the active AI if present|
 +
 +This is an example of using this action:
 +<code xml>
 +<action name='aiAction.update'>
 +  <parameter name='ai.actionFinished'>success</parameter>
 +</action>
 +</code>
 +
 +===== aiAction.check =====
 +
 +Check one or more behavior parameters. Action succeeds if all parameter value matches their respective player input crouch parameter otherwise action fails. This action is typically used as first action in a sequence to run the sequence only if a player input crouch parameter matches (or not).
 +
 +^Parameter^Value^Description^
 +|action.conversationWait|''true'', ''false''|Conversation waits due to active action|
 +
 +This is an example of using this action:
 +<code xml>
 +<sequence>
 +  <action name='aiAction.check'>
 +    <parameter name='action.conversationWait'>true</parameter>
 +  </action>
 +  <!-- actions here run only if conversation wait is enabled -->
 +</sequence>
 +</code>
 +
 +====== Behavior Tree Conditions ======
 +
 +This behavior adds these behavior tree conditions if behavior tree is present.
 +
 +===== aiAction.check =====
 +
 +Check one or more behavior parameters. Conditions returns true if all parameter value match their respective player input crouch parameter. This condition is typically used to run an action or sequence of actions as long as player input crouch conditions are true.
 +
 +^Parameter^Value^Description^
 +|aiAction.action.conversationWait|''true'', ''false''|Conversation waits due to active action|
 +
 +This is an example of using this condition:
 +<code xml>
 +<action name='myAction' id='doing something'>
 +  <parameter name='aiAction.action.conversationWait'>true</parameter>
 +  <condition>aiAction.check</condition>
 </action> </action>
 </code> </code>
dragengine/modules/dragonscript/behavior_actoraiaction.1746548081.txt.gz · Last modified: 2025/05/06 16:14 by dragonlord