Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text format behavior trees defining args enhancement #69

Open
NemesisMate opened this issue May 2, 2016 · 1 comment
Open

Text format behavior trees defining args enhancement #69

NemesisMate opened this issue May 2, 2016 · 1 comment

Comments

@NemesisMate
Copy link

NemesisMate commented May 2, 2016

I've been looking around but It doesn't seem to be possible to use variables when defining trees by text foramt. What I'm really trying is to do is, for example (taken from the "dog example"):

subtree name:"actOnYourOwn"
  selector
    (random success:0.1) piss
    parallel policy:"selector"
      wait seconds:"uniform,3,6"
      randomSelector
        wander gait:$(gaitType)
        wander gait:"walk"
        lieDown
        sit

Where I could import the "actOnYourOwn" tree in a manner that $(gaitType) would be replaced but a given value, allowing to create general tasks to be used by many different entity personalities.

@davebaol
Copy link
Member

davebaol commented May 2, 2016

TBH I don't think I'll have the time to implement your enhancement.
Also you can easily achieve a similar result by setting a property of the entity before including the tree.
For instance

subtree name:"actOnYourOwn"
  selector
    (random success:0.1) piss
    parallel policy:"selector"
      wait seconds:"uniform,3,6"
      randomSelector
        wanderUsingCurrentGait
        lieDown
        sit
...
setGait value:"run"
$actOnYourOwn
...
setGait value:"walk"
$actOnYourOwn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants