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"

Behavior tree quickstart guide - bot not returning home

Hi all, I wonder if someone could perhaps assist me with a strange problem I'm having - I've followed the behavior tree quickstart guide on this site through all the way and most of it is working perfectly: https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/QuickStart/

I have one issue in that when the bot loses sight of my character, it does not just stop at my character's last seen 'TargetLocation', it keeps chasing me. It really is very strange because it looks like the values to all of the objects / variables are correct after the bot loses site of my character (TargetToFollow = None, TargetLocation = My last 'seen' location, HomeLocation = Never changes). Somehow the AI bot still knows where I am despite the TargetLocation only being set to where it last saw me and I'm out of sight well before it even gets to that location.

I don't know if it'll help but during this period of time where it's magically finding me, the behaviour tree nodes rapidly flash between RapidMoveTo and MoveTo (TargetLocation) as can be seen here: https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/QuickStart/14/index.html

I re-reviewed everything and I can't see anything different between what I've done and what the guide has instructed me to do.

I can prevent the bot from magically finding me once I'm out of sight by deleting the 'Moveto (TargetLocation)' node, but I don't want to do this because I want the bot to actually go to the point that it actually last saw me at. This suggests that it's some sort of issue with that Moveto node, but how could this be?

I'm very confused right now, anyone have any idea what the issue could be? :)

Product Version: UE 4.8
Tags:
more ▼

asked Aug 02 '15 at 10:35 AM in Blueprint Scripting

avatar image

Andy Green
8 1 2 5

avatar image Ghar Aug 02 '15 at 11:49 AM

Does the behavior stays at the RapidMoveTo task? or it executes it contantly? When the Bot is supposed to be stopped but instead is following you, what task is being executed?

That AIMoveTo node is bothering me. Will that task RapidMoveTo fail after AIMoveTo? maybe it is keeping the behavior stuck.

Sorry I don't have UE4 installed atm to test it.

On a side note, that tutorial is kinda old so something may have changed. You can tell because it's not using some new nodes that have been added. It should be using the IsValid node that returns a bool value instead of comparing an object to None. It also should be using the new Event nodes in the Tasks, Decorators, and Service blueprints. EventReceiveExecuteAI instead of EventReceiveExecute will return the AIController and the ControlledPawn instead of only returning the AIController. The same for EventReceiveConditionCheckAI and EventReceiveTickAI. If you are going to get the ControlledPawn of the AIController, use those events instead.

avatar image Andy Green Aug 02 '15 at 12:32 PM

Ok, thanks for the info Ghar - I didn't realise that the guide was outdated. I'll see if I can find a more up-to-date tutorial to do this, I've tried a few already but there always seems to be some sort of issue with each one I've tried.

avatar image Ghar Aug 02 '15 at 12:40 PM

A long time ago I read here from MieszkoZ himself that AIMoveTo was never intended to be used inside BT tasks. That is why that tutorial has always bothered me lol.

I hope you can actually make it work though.

(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