x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Blackboard Values Not Saving in Behavior Tree

I'm attempting to build a simple behavior tree where a turret will "Sleep" if the player character is outside the range of its active area.

I have been able to work out the logic for determining distance along with the various actions that should be taken when a behavior tree selector passes as the result of an evaluation on its decorator.

Right now, the decorator consistently fails (leaving me in the sleep state, and refusing to wake.) This is because when I invoke "Set BB Value as Int" inside of the sleep task (as part of the result of a successful distance check) the value in the blackboard data is not being persisted.

I am confirming that this is the case by printing the value of the retained "State" at the beginning of the task, and then printing it again at the end of the execution of the task (just before finishing execution.)

I am wondering if anyone else is seeing an issue like this, and if there might be a step I've left out in the construction of Blackboard, Behavior Tree, Task and Enumeration.

Product Version: Not Selected
Tags:
more ▼

asked Jul 05 '14 at 10:35 PM in Blueprint Scripting

avatar image

Thomas Ingham
326 16 24 34

avatar image Thomas Ingham Jul 05 '14 at 10:41 PM

alt text

Example code that outputs "0" in both cases regardless of call path.

65231-01.jpg (135.2 kB)
avatar image mikepurvis Aug 03 '14 at 05:59 PM

Did you get this fixed? I'm having a similar issue with setting BB values in a service, they are not setting.

avatar image AlejoS Aug 04 '14 at 01:17 PM

the only workaround I found is tu se functions to get/set variables

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Try this:

My issue with this was temporary and I got past it.

In the Behavior Tree Editor, select a node that uses any of the BlackBoard Values, and look to the details panel to the right. There will be a drop down combo box next to each BlackBoard Value, they default to the first one, so they will initially all be set incorrectly.

I forgot this step over the weekend because it had been a while since I was working in the Tree. Without it, none of my BB variables were changing at runtime.

more ▼

answered Aug 04 '14 at 02:17 PM

avatar image

mikepurvis
2.5k 102 67 261

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

First, you mist define and assign all the variables in the Blackboard.

Second, for each variable used on every Beheavior tree/service, you must assign which blaboardkey value represents each.

Also.. based on the screen, looks like you are using standard variables rather than blackboard key value types.

more ▼

answered Jul 27 '14 at 04:27 PM

avatar image

AlejoS
1 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question