User Tools

Site Tools


dragengine:modules:dragonscript:behavior_actoranimated

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_actoranimated [2025/03/11 19:57] dragonlorddragengine:modules:dragonscript:behavior_actoranimated [2025/03/13 17:25] (current) 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]] >> **ECBehaviorActorAnimated**+[[: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]] >> **ECBehaviorActorAnimated**
 </WRAP> </WRAP>
  
Line 14: Line 14:
  
 To simplify using actor animation a map of controller bindings can be defined to be applied to ECBehaviorLocomotion each time the animator changes. This requires controller names to be consistent and unique across animators but makes life a lot easier. If no map is defined the behavior does not change the locomotion controller mapping. While changing animator controllers with matching names are not reset. To simplify using actor animation a map of controller bindings can be defined to be applied to ECBehaviorLocomotion each time the animator changes. This requires controller names to be consistent and unique across animators but makes life a lot easier. If no map is defined the behavior does not change the locomotion controller mapping. While changing animator controllers with matching names are not reset.
 +
 +See also:
 +  * [[gamedev:animators|Animators and Animations]]
 +  * [[gamedev:deigde:editors:animator|IGDE Animator Editor]]
 +  * [[tools:blenderexportscripts|Blender3D Export Scripts]]
  
 ====== Instance Counts ====== ====== Instance Counts ======
Line 53: Line 58:
 ====== Required Behaviors ====== ====== Required Behaviors ======
  
-This behavior requires these other behaviors: 
   * [[behavior_component|ECBehaviorComponent]]   * [[behavior_component|ECBehaviorComponent]]
  
 ====== Optional Behaviors ====== ====== Optional Behaviors ======
  
-This behavior does supports these optional behaviors: 
   * [[behavior_locomotion|ECBehaviorLocomotion]]: Updates locomotion controller mappings if animator changes.   * [[behavior_locomotion|ECBehaviorLocomotion]]: Updates locomotion controller mappings if animator changes.
  
 ====== Persistency ====== ====== Persistency ======
  
-This behavior does support element class to be persistable (setPersistable). Saves these states: +This behavior does support element class to be persistable (setPersistable).
-  * Active animator identifier +
-  * State of controllers in the animator +
-    * Controller value +
 ====== API Documentation ====== ====== API Documentation ======
  
Line 112: Line 111:
     <!-- optional: use component with id instead of empty string -->     <!-- optional: use component with id instead of empty string -->
     <string name='component'>second</string>     <string name='component'>second</string>
 +    
 +    <!-- calls setDefaultControllerMappings() after creating behavior -->
          
     <!-- set element properties. omit property prefix if used inside behavior tag -->     <!-- set element properties. omit property prefix if used inside behavior tag -->
Line 119: Line 120:
       <string key='flying'>flying.deanimator</string>       <string key='flying'>flying.deanimator</string>
     </map>     </map>
 +  </behavior>
 +  
 +  <!-- for adding multiple behaviors use unique identifiers -->
 +  <behavior type='ECBehaviorActorAnimated' id='second'>
 +    ...
   </behavior>   </behavior>
 </elementClass> </elementClass>
dragengine/modules/dragonscript/behavior_actoranimated.1741723063.txt.gz · Last modified: 2025/03/11 19:57 by dragonlord