User Tools

Site Tools


dragengine:modules:dragonscript:behavior_statemachine

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_statemachine [2025/05/03 13:15] – [path] dragonlorddragengine:modules:dragonscript:behavior_statemachine [2025/05/09 19:04] (current) dragonlord
Line 49: Line 49:
   * Expected File Type: ''*.desm''   * Expected File Type: ''*.desm''
   * Example (*.deeclass) <code xml><string name='stateMachine.path'>actor.desm</string></code>   * Example (*.deeclass) <code xml><string name='stateMachine.path'>actor.desm</string></code>
 +
 +===== debug =====
 +Debug mode prefix. If not empty string enables debug mode with prefix to locate log messages easily.
 +  * Full name: ''stateMachine.debug'' or ''stateMachine({id}).debug''
 +  * Type: string
 +  * Default Value: empty string
 +  * Example (*.deeclass) <code xml><string name='stateMachine.debug'>Debug-Actor-SM</string></code>
  
 ===== Events ===== ===== Events =====
Line 75: Line 82:
 ===== stateMachine.event ===== ===== stateMachine.event =====
  
-Run event on state machine. Action returns BTResult.success no matter if current state understands event or not unless ''required'' parameter is present.+Run event on state machine.
  
 ^Parameter^Value^Description^ ^Parameter^Value^Description^
 |id|string|Identifier of event to run| |id|string|Identifier of event to run|
-|required| |If present action fails if current state does not understand event| 
  
 This is an example of using this action: This is an example of using this action:
Line 101: Line 107:
 |state.contains|string|Current state identifier contains string value| |state.contains|string|Current state identifier contains string value|
 |state.contains.not|string|Current state identifier does not contain string value| |state.contains.not|string|Current state identifier does not contain string value|
-|event|string|Current state understands event matching string value| +|wait| |If present action returns BTResult.running instead of BTResult.failed to wait until the checks are all fulfilled|
-|event.not|string|Current state does not understand event matching string value|+
  
 This is an example of using this action: This is an example of using this action:
Line 131: Line 136:
 |stateMachine.state.contains|string|Current state identifier contains string value| |stateMachine.state.contains|string|Current state identifier contains string value|
 |stateMachine.state.contains.not|string|Current state identifier does not contain string value| |stateMachine.state.contains.not|string|Current state identifier does not contain string value|
-|stateMachine.event|string|Current state understands event matching string value| 
-|stateMachine.event.not|string|Current state does not understand event matching string value| 
  
 This is an example of using this condition: This is an example of using this condition:
dragengine/modules/dragonscript/behavior_statemachine.1746278143.txt.gz · Last modified: 2025/05/03 13:15 by dragonlord