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"

can't set blackboard value

I am having trouble setting a blackboard value from the AIController. I try to set a value, then I print out the blackboard's value. I always get the same default Vector, no matter what value I try to set.

alt text Prints: alt text

Note: this only happens when I connect the Behavior Tree. Without the BT, the BB sets and gets the same value.

Product Version: Not Selected
more ▼

asked Jan 26 '15 at 09:54 AM in Blueprint Scripting

avatar image

165 16 20 22

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

1 answer: sort voted first

What's the Target Location variable's value when you run the code? You can put a breakpoint on BP node and once it's hit mouse-over on pins will tell you current value.

more ▼

answered Jan 26 '15 at 09:57 AM

avatar image

MieszkoZ STAFF
7.4k 225 57 415

avatar image lukefwilson Jan 26 '15 at 10:15 AM

So the variable's value is None (that was because I forgot to set the default value). So I went ahead and used a literal name: alt text This works, but once I add the Run BT node after the final print string, my editor crashes. This happens with both the Literal Name and the variable with the correct value.

avatar image MieszkoZ STAFF Jan 26 '15 at 10:29 AM

Do you get any callstack when crashing, or can post the log? The only guess I can make at this point is one of your BB functions is out of context - did you disable context sensitivity to be able to put a specific function in? If so then don't :) There's a bug in Blueprint compiler that results in it not complaining if you're using functions that silently take "self" as first parameter even if it's of wrong class.

avatar image lukefwilson Jan 26 '15 at 08:06 PM

Okay, I've made some progress. Now I think the problem is in my BT MoveTo task. The BT and editor does not crash when I use the wait task with a TargetLocation is set decorator. But it does with a MoveTo task

avatar image lukefwilson Jan 26 '15 at 08:54 PM

Okay I've solved it. The BaddiePatroller needed to be a Character rather than a Pawn. This was causing the MoveTo task to crash!

avatar image MieszkoZ STAFF Jan 27 '15 at 09:07 AM

Thanks a lot for nailing it down! I'll make a note of it and make sure it gets fixed (it should never crash!). Cheers!

(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