This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dragengine:modules:dragonscript:behavior_behaviortree [2025/03/13 18:22] – [ECBehaviorBehaviorTree] dragonlord | dragengine:modules:dragonscript:behavior_behaviortree [2025/05/16 14:34] (current) – dragonlord | ||
|---|---|---|---|
| Line 36: | Line 36: | ||
| See also: | See also: | ||
| - | * [[formats:modules:debtree:xml_behavior_tree_file_.debtree|Behavior | + | * [[dragengine:modules:dragonscript:behaviortrees|Behavior |
| ====== Instance Counts ====== | ====== Instance Counts ====== | ||
| Line 49: | Line 49: | ||
| * Type: string | * Type: string | ||
| * Default Value: empty string | * Default Value: empty string | ||
| - | * Expected File Type: '' | + | * Expected File Type: '' |
| - | * Example (*.deeclass) <code xml>< | + | * Example (*.deeclass) <code xml>< |
| ===== run ===== | ===== run ===== | ||
| Line 104: | Line 104: | ||
| func new() | func new() | ||
| var ECBehaviorBehaviorTree btbehavior = ECBehaviorBehaviorTree.new(this) | var ECBehaviorBehaviorTree btbehavior = ECBehaviorBehaviorTree.new(this) | ||
| - | btbehavior.getPath().setValue("/ | + | btbehavior.getPath().setValue("/ |
| btbehavior.getRun().setValue(true) | btbehavior.getRun().setValue(true) | ||
| | | ||
| Line 122: | Line 122: | ||
| func new() | func new() | ||
| var ECBehaviorBehaviorTree btSpecific = ECBehaviorBehaviorTree.new(this, | var ECBehaviorBehaviorTree btSpecific = ECBehaviorBehaviorTree.new(this, | ||
| - | btSpecific.getPath().setValue("/ | + | btSpecific.getPath().setValue("/ |
| btSpecific.getRun().setValue(true) | btSpecific.getRun().setValue(true) | ||
| | | ||
| var ECBehaviorBehaviorTree btIdle = ECBehaviorBehaviorTree.new(this, | var ECBehaviorBehaviorTree btIdle = ECBehaviorBehaviorTree.new(this, | ||
| - | btIdle.getPath().setValue("/ | + | btIdle.getPath().setValue("/ |
| btIdle.getRun().setValue(true) | btIdle.getRun().setValue(true) | ||
| | | ||
| Line 142: | Line 142: | ||
| func new() | func new() | ||
| var ECBehaviorBehaviorTree btree = ECBehaviorBehaviorTree.new(this) | var ECBehaviorBehaviorTree btree = ECBehaviorBehaviorTree.new(this) | ||
| - | btSpecific.getPath().setValue("/ | + | btSpecific.getPath().setValue("/ |
| // | // | ||
| | | ||
| Line 154: | Line 154: | ||
| func new() | func new() | ||
| // load behavior tree to use. this is not required but allows to use different | // load behavior tree to use. this is not required but allows to use different | ||
| - | // behavior trees for different AI routines. if not used the "/ | + | // behavior trees for different AI routines. if not used the "/ |
| // would be used as defined in MyElementClass. | // would be used as defined in MyElementClass. | ||
| var BehaviorTree btree = BaseGameApp.getApp().getLoaders() \ | var BehaviorTree btree = BaseGameApp.getApp().getLoaders() \ | ||
| - | .getBehaviorTree().loadFromFile("/ | + | .getBehaviorTree().loadFromFile("/ |
| | | ||
| // create context. BAAIBehaviorTree requires a BTContextAI subclass hence we can | // create context. BAAIBehaviorTree requires a BTContextAI subclass hence we can | ||
| Line 206: | Line 206: | ||
| < | < | ||
| <!-- set element properties. omit property prefix if used inside behavior tag --> | <!-- set element properties. omit property prefix if used inside behavior tag --> | ||
| - | <string name=' | + | <string name=' |
| </ | </ | ||
| | | ||