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"

AI patrols

Hey guys, I've been getting my feet wet with AI in unreal and i just have a conceptual question about how to structure the logic in the blackboard/behavior trees:

I'm trying to make some fixed waypoint patrol paths for a village guard and I want him to switch between a few paths throughout the day based on time. For example, he patrols path A between 3 fixed points in the morning, and then path B between 3 different points in the afternoon.

Should I setup different behavior trees for Path A/Path B and run each behavior tree independently from the Event Graph? Or do I just make different sequence paths inside one behavior tree for each path, and cast/change the stored variable to activate each sequence from the event graph?

Product Version: UE 4.11
Tags:
more ▼

asked Apr 11 '16 at 09:27 PM in Blueprint Scripting

avatar image

Simsaladoo
16 4 4 8

avatar image keyle Apr 12 '16 at 01:16 AM

Hard to tell. As Carmack would say, do both and you will see what works best.

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

2 answers: sort voted first

Okay wow, I've had a lot of work with this now and I understand it better.

Do NOT try and run 8 separate sequence branches on one bhtree that each have ~5 branches of their own with services and tasks everywhere. Do that, and you're gonna have a bad time.

It's much better to split up those 8 into their own behavior trees and choose them with the player controller. Debugging is easier, bots don't randomly get hung up for what seems like no apparent reason, and you wont end up with bots following one task while having the blackboard key of another and other fun-ness.

more ▼

answered Oct 23 '16 at 03:19 PM

avatar image

Simsaladoo
16 4 4 8

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

Use a Behavior Tree Service to select the desired path in your AI Tree. This way it can react to other things (say a wild bear attack).

more ▼

answered Apr 12 '16 at 01:31 AM

avatar image

Nodrak
26 1 4 6

(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