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"

Generic vs AI version of Events in Behaviour Tree Task

For example the "Event Receive Execute" and "Event Receive Execute AI". Is this refering to Controller vs Controllerless Behaviour Trees? I have not found any information about using BTs in non Pawn/Character AI. I would like to try implementing AI for example a building, say a farm managing it's resources, products, farmers etc. I am refering to blueprints but I could do some of this in C++.


Product Version: UE 4.16
more ▼

asked Jul 07 '17 at 01:55 PM in Blueprint Scripting

avatar image

Dimitris B.
13 7 7

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

1 answer: sort voted first

Best explaination of this is found in the API.

  • [ReceiveExecute][1]

  • [ReceiveExecuteAI][2]

    If both generic and AI event versions are implemented, then only the more suitable one will be called. Meaning the AI version if the pawn is AI controlled, generic one otherwise.

Remember though, if only one is implemented, then that will get called.

In the C++ engine source, you can find the exact trigger for the differences.

more ▼

answered Jul 17 '17 at 06:29 PM

avatar image

1.6k 34 13 50

avatar image Dimitris B. Jul 21 '17 at 08:21 AM

Thank you very much. My thinking is stuck in this: If AIOwner is the Controller and I don't want to provide one, since my Actor is not a Pawn, how do I use a Behaviour Tree in blueprints without specifying a Controller? I tried to provide a null Controller to the blueprint node "RunBehaviourTree" but this gives a runtime error. I also checked out the blueprint node "SpawnAIFromClass" but this also expects a Pawn.


avatar image BenVlodgi Jul 21 '17 at 03:46 PM

You need to have a Controller to use the Behavior tree. The functions pass controllers around. That is the basis of how the tree works. You can make a custom controller with a reference to the Actor you are using, then in your Behavior tree functions, cast to that controller and get the controlled actor.

I suggest though that you re-parent your controlled class to be a Pawn. Unreal is build on the assumption that anything that can be controlled is a Pawn.

avatar image Dimitris B. Jul 21 '17 at 04:29 PM

Thank you for clarifying this.

avatar image BenVlodgi Jul 21 '17 at 05:17 PM

Happy to help. :)

(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