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 trees doesn't work

Hi i have followed this link https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/QuickStart/1/index.html i have done the same things but it doesn't work what do i do ? did they change or update something ? please help me Thanks.

Product Version: UE 4.13
Tags:
more ▼

asked Oct 31 '16 at 02:18 AM in Blueprint Scripting

avatar image

paeillicit
71 4 8 11

avatar image Rekenq Oct 31 '16 at 03:12 AM

What do you mean it doesn't work? Explain with a little more detail please. Is it not compiling? is the AI just staying there without doing nothing? is the AI not spawning? And show pictures of your blueprints too please

avatar image paeillicit Oct 31 '16 at 03:48 AM

alt text

alt text

alt text

alt text

alt text

here i did the same things

services 1.jpg (79.8 kB)
services 2.jpg (117.2 kB)
services 3.jpg (102.8 kB)
services 4.jpg (106.4 kB)
services 5.jpg (100.7 kB)
avatar image paeillicit Oct 31 '16 at 03:54 AM

what i means i really did exactly everything as https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/QuickStart/1/index.html

i don't know if there's bug or not

avatar image paeillicit Oct 31 '16 at 03:57 AM

alt text alt text alt text alt text alt text

task 1.jpg (92.7 kB)
task 2.jpg (85.8 kB)
decorator.jpg (133.1 kB)
behavior tree.jpg (155.0 kB)
avatar image paeillicit Oct 31 '16 at 03:58 AM

alt text alt text

ai_character.jpg (204.5 kB)
avatar image Rekenq Oct 31 '16 at 04:29 AM

Please describe what happens when you hit play, that's the most important piece of info I need so I can try to help you.

Saying

i have done the same things but it doesn't work what do i do ?

or

what i means i really did exactly everything as https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/QuickStart/1/index.html

Doesn't help me to understand the nature of your problem at all.

avatar image paeillicit Oct 31 '16 at 04:37 AM

i'm sorry after i hit play my enemies doesn't follow my character it's just stand still

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

1 answer: sort voted first

Ok let's do this. In your first image you have a cast node that is not being executed. Why is that?

alt text

You can see that the Cast To Followers_AI_CON has no execute pin connected to it so it will never run that part of the code.

Now on your fourth and fifth image you show this:

alt text alt text

Here you are doing a line trace then checking if what you hit is the same as some other actor that comes from an array of hit structs, now my question is this, when the result is true then you set the target to follow blackboard variable, however, you are not connecting anything to the Value pin so you are effectively setting the value to null, do you want this? or did you forget to connect something there?

And for your image number six

alt text

Same thing as the first one.

more ▼

answered Oct 31 '16 at 04:56 AM

avatar image

Rekenq
717 18 6 25

avatar image paeillicit Oct 31 '16 at 05:06 AM

Thank you i have fixed it already but still doesn't works

avatar image Rekenq Oct 31 '16 at 07:10 AM

How did you fixed it? Show me please

avatar image paeillicit Oct 31 '16 at 08:46 AM

alt text alt text

here i connected the lines that i forgot thanks for helping me

fixed service.jpg (108.5 kB)
fixed service2.jpg (109.0 kB)
avatar image Rekenq Oct 31 '16 at 05:31 PM

Ok good, that's agrocheck, what about the one in RapidMoveTo?

avatar image paeillicit Nov 01 '16 at 12:51 AM

alt text alt text

Here thank you for have been helping me

rapidmoveto.jpg (137.5 kB)
rapidmoveto 2.jpg (144.2 kB)
avatar image Rekenq Nov 01 '16 at 01:23 AM

Ok new idea. Maybe what's happening is that your RapidMoveTo is being executed so quickly that you are not giving your AI chance to move. Check this simple patrol task I did. I bind the ReceiveMoveCompleted event to my own event so only after the move to is completed I then proceed to finish the execution of the task.

alt text

Note: A good way to debug AI is to have your behavior tree blueprint open while playing the game, unposses your character and click on your AI character to select it then go to your Behavior Tree blueprint and check what branch is being executed and how fast.

movetotask.png (184.8 kB)
avatar image paeillicit Nov 01 '16 at 01:39 AM

so that means the tutorial of unreal engine there's bug or something wrong that's why it doesn't work am i right ?

avatar image Rekenq Nov 01 '16 at 05:30 AM

Well remember that you had errors before, you might be missing something

avatar image paeillicit Nov 02 '16 at 12:43 AM

anyway thank you very much for helping me

(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