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 [2026/10/12 19:23] – [eventElement.update] dragonlorddragengine:modules:dragonscript:behavior_statemachine [2026/11/18 16:37] (current) – dragonlord
Line 68: Line 68:
  
 This behavior adds these state machine actions. This behavior adds these state machine actions.
 +
 +===== self =====
 +
 +Set state machine parameters.
 +
 +^Parameter^Value^Description^
 +|debug.name|string|Set logging name. This name is prepended to logs if enabled.|
 +|debug.targets|list|List of whitespace separated targets to log. Valid targets: ''actions'', ''transitions'', ''stateChanges''. Empty list disables logging.|
 +
 +This is an example of using this action to fully hide the owner element:
 +<code xml>
 +<action name='self'>
 +  <parameter name='debug.name'>SM-Debug</parameter>
 +  <parameter name='debug.targets'>actions transitions stateChanges</parameter>
 +</action>
 +</code>
  
 ===== element.set ===== ===== element.set =====
Line 139: Line 155:
 |action|string|Name of action to run.| |action|string|Name of action to run.|
 |receiveEvents|''true'', ''false''|Enable receiving game world events| |receiveEvents|''true'', ''false''|Enable receiving game world events|
 +|runEvent|string|Run event on all state machines of element set to receive game world events. The state machine owner is set as event parameter.|
  
 This is an example of using this action to spawn a new element: This is an example of using this action to spawn a new element:
Line 147: Line 164:
   <parameter name='properties'>propertyName1:propertyValue1 propertyName2:propertyValue2</parameter>   <parameter name='properties'>propertyName1:propertyValue1 propertyName2:propertyValue2</parameter>
   <parameter name='spawnPoint'>spawn point name</parameter>   <parameter name='spawnPoint'>spawn point name</parameter>
 +</action>
 +</code>
 +
 +This is an example of using this action to run event on [[appbehavior_behaviorstatemachine|application state machines]]:
 +<code xml>
 +<action name='gameWorld'>
 +  <parameter name='action'>app.btsm.runEvent</parameter>
 +  <parameter name='event'>fade over black</parameter>
 </action> </action>
 </code> </code>
Line 184: Line 209:
 |eventElement.flags.set|string|Event element has [[behavior_flags|ECBehaviorFlags]] with named flag set.| |eventElement.flags.set|string|Event element has [[behavior_flags|ECBehaviorFlags]] with named flag set.|
 |eventElement.flags.clear|string|Event element has [[behavior_flags|ECBehaviorFlags]] with named flag cleared.| |eventElement.flags.clear|string|Event element has [[behavior_flags|ECBehaviorFlags]] with named flag cleared.|
 +|eventElement.interactElement.assigned|string|Event element is assigned to [[behavior_interactelement|ECBehaviorInteractElement]] with identifier matching value string.|
 +|eventElement.interactElement.assigned.not|string|Event element is not assigned to [[behavior_interactelement|ECBehaviorInteractElement]] with identifier matching value string.|
  
 This is an example of using this action: This is an example of using this action:
dragengine/modules/dragonscript/behavior_statemachine.1791832994.txt.gz · Last modified: by dragonlord