User Tools

Site Tools


dragengine:modules:dragonscript:behavior_stepaside

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_stepaside [2024/03/14 16:56] dragonlorddragengine:modules:dragonscript:behavior_stepaside [2025/03/13 17:10] (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]] >> **ECBehaviorStepAside**+[[: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]] >> **ECBehaviorStepAside**
 </WRAP> </WRAP>
  
Line 8: Line 8:
  
 ====== ECBehaviorStepAside ====== ====== ECBehaviorStepAside ======
 +
 +<WRAP center 100%>
 +<WRAP center box 450px>
 +{{youtube>BbP-lMrr0tQ?medium}}
 +<WRAP centeralign>Behavior in action</WRAP>
 +</WRAP>
 +</WRAP>
  
 Behavior adding support to actors to step aside if told. Behavior adding support to actors to step aside if told.
Line 16: Line 23:
  
 This behavior can be disabled temporarily to prevent actors from stepping aside. This behavior can be disabled temporarily to prevent actors from stepping aside.
- 
-<WRAP center 100%> 
-<WRAP center box 450px> 
-{{youtube>BbP-lMrr0tQ?medium}} 
-<WRAP centeralign>Behavior in action</WRAP> 
-</WRAP> 
-</WRAP> 
  
 ====== Instance Counts ====== ====== Instance Counts ======
Line 28: Line 28:
  
 ====== Element Class Properties ====== ====== Element Class Properties ======
-Element class properties have the prefix **stepAside.**.+Element class properties have the prefix ''stepAside.'' .
  
 ===== enabled ===== ===== enabled =====
 Determines if the behavior is initially enabled. Determines if the behavior is initially enabled.
-  * Full name: "stepAside.enabled"+  * Full name: ''stepAside.enabled''
   * Type: boolean   * Type: boolean
-  * Default Value: true+  * Default Value: ''true''
   * Example (*.deeclass) <code xml><boolean name='stepAside.enabled'>false</boolean></code>   * Example (*.deeclass) <code xml><boolean name='stepAside.enabled'>false</boolean></code>
  
 ===== radius ===== ===== radius =====
 Avoid radius. Actor tries to move to a position with this distance away from the moving lane of the actor requesting to step aside. Avoid radius. Actor tries to move to a position with this distance away from the moving lane of the actor requesting to step aside.
-  * Full name: "stepAside.radius"+  * Full name: ''stepAside.radius''
   * Type: floating point   * Type: floating point
   * Minimum Value: 0   * Minimum Value: 0
Line 57: Line 57:
 #@LinkApiDocDEDS2_HTML~classDragengine_1_1Scenery_1_1ECBehaviorStepAside.html,ECBehaviorStepAside~@#. #@LinkApiDocDEDS2_HTML~classDragengine_1_1Scenery_1_1ECBehaviorStepAside.html,ECBehaviorStepAside~@#.
  
-Since DragonScript Module Version **1.4**+Since DragonScript Module Version ''1.4''
  
 ====== Use Cases ====== ====== Use Cases ======
Line 90: Line 90:
 end end
 </code> </code>
 +
 +====== Behavior Factory ======
 +
 +Using element class supporting adding behaviors the behavior can be added like this:
 +<code xml>
 +<?xml version='1.0' encoding='UTF-8'?>
 +<elementClass name='MyClass' class='GenericBehaviorElement'>
 +  <behavior type='ECBehaviorComponent'/>
 +  <behavior type='ECBehaviorCollider'/>
 +  <behavior type='ECBehaviorColliderAI'/>
 +  <behavior type='ECBehaviorLocomotion'/>
 +  <behavior type='ECBehaviorNavigator'/>
 +  <behavior type='ECBehaviorActorMover'/>
 +  
 +  <behavior type='ECBehaviorStepAside'>
 +    <!-- set element properties. omit property prefix if used inside behavior tag -->
 +    <float name='.radius'>0.5</float>
 +  </behavior>
 +</elementClass>
 +</code>
 +
 +====== Live Examples ======
 +
 +  * [[https://github.com/LordOfDragons/deexamples|DEExamples Repository]]
 +
dragengine/modules/dragonscript/behavior_stepaside.1710435413.txt.gz · Last modified: 2024/03/14 16:56 by dragonlord