pruttned / owl-bt

owl-bt is editor for Behavior trees. It has been inspired by Unreal engine behavior trees in a way, that it supports special node items like decorators and services. This makes trees smaller and much more readable.
175 stars 28 forks source link

enhancement: temp disable tree nodes #18

Closed jimmymjing closed 4 years ago

jimmymjing commented 4 years ago

I think it would be great to have a feature like disabling tree node and its sub nodes. (They may get greyed out). This would be very useful for testing AI's behavior for a specific part.

pruttned commented 4 years ago

Hi, you are able to achieve such thing using inheritance and custom field on base node (except of greyed out part). E.g. something like this:

{
    "name": "BaseNode",
    "isAbstract" : true,
    "properties": [{
        "name": "disable",
        "type": "bool"
    } ]
},
{
    "name": "MyDerivedNode",
    "color": "blue",
    "base": "BaseNode",
}