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"

Service ReceieveActivation and MoveTo don't trigger

I have a couple of questions regarding the behaviour tree, as to be honest I'm having some real difficulties with it..

I'm trying to work out why the MoveTo doesn't trigger.

I have 2 services and a task (please see attached picture). BS_SelfCheck simply checks if the ControllerAI's controlled pawn has anything on it's action stack (declared as a local array in the character blueprint), if it does, it sets the blackboard key "InputAction". BS_ActionCheck checks the first element in the characters action stack (at the moment only ever move requests). If it's a move request, it sets the "ActMove" blackboard key and sets "LocTrgt" (Vector ) to the location to move to. I've checked the logic in both services, and in both cases the InputAction, ActMove, and LocTrgt blackboard keys are set and to the correct values immediately before exiting the event tick code nodes (got them back out of the blackboard after setting them to check their values).

alt text

First point, The "Event Receive Activation" event is called in BS_SelfCheck, but never in BS_ActionCheck (I set a breakpoint set after the BS_ActionCheck EventTick node which catches, but a breakpoint straight after it's Receive Activation Event is never triggered).

The second point, I don't know whether the MoveTo task is being called (I think the breakpoints placed on composites in the BT don't ever trigger (neither of the breakpoints in the picture trigger even when they've been passed through). Note: I've just removed the connection to the MoveTo composite and replaced it by connecting to the BTActionAction composite, and this gets called fine (breakpoint inside), so I'm assuming I'm not calling the MoveTo task correctly..

Third point, I would have preferred to use a decorator for the BS_ActionCheck, but this is a temporary workaround as I tried to write a user defined decorator that did the same thing, but I couldn't find either the "Finish Condition Check" (deprecated) or the suggested "Perform Condition Check" nodes in the event graph context menu. Any idea why these aren't appearing? What node should I use to return the condition result from a user defined decorator?

Last one, would the BS_ActionCheck service stop running (get killed) when the selector/sequence composite it is in exits (i.e. has finished evaluating and running child nodes and falls back up the tree)?

Any help would be great.. Thnx

Product Version: Not Selected
behaviourtree.png (75.0 kB)
more ▼

asked Apr 16 '15 at 04:41 PM in Blueprint Scripting

avatar image

63 6 10 16

avatar image ChaoSXDemon Feb 04 '16 at 01:31 AM

If you play the game and press the apostrophe hey ('), you bring up a debug menu. Then press "2" to on numpad (yes only numpad) to enable behavior tree debug render. There you should see what your behavior tree is doing. Toggle apostrophe if you aren't selecting the character to debug OR eject and select the pawn to debug then possess again to see debug info. A note on that is any service that writes state into Blackboard, you need to override the "OnSearchStart" to ensure any decorators below it gets the right value before your service is executed.

avatar image Mach45 Feb 19 '16 at 04:06 PM

Thanks, will give it a try. Been a while since I've done anything in the behaviour trees, and think there's been a lot of updates. So will see how it all goes now..

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

0 answers: sort voted first
Be the first one to answer this question
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