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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Behavior Tree sequence always executing even on success

I going through setting up a basic AI but am having a bit of trouble with the transition from attacking to movement when the last enemy is killed. My understanding of the Selector node was that it would execute untl success then collapse up the tree ignoring un-executed tasks. This seems to work fine on the attacking side of my tree but not on the movement side of things.

As you can see my Behavior Tree uses a selector to execute two tasks. One finds the location it is going to go to and the other tells the character to move there. This in general works fine until one final use case where the last visible enemy is killed and the AI returns to the movement branch of the tree. They are technically still animating their attack so they need to delay just a little bit before moving again.

alt text

Every tick my pawn enters a gate and updates attack delay until it is

alt text

To account for this delay before movement as well, I do a quick check at the end of my BTT_FindRoute. The pawn calculates how long is left on the animation (modified by attack speed buffs / debuffs which are not implemented yet so can be considered modifiers of 0) So, grabbing the AttackDelay from the pawn, I check if it's If it is I finish execute with success false so it will execute the next node and allow movement. If it is not I finish execute with success true so it will collapse up and ignore the move to task.

alt text

However, it always does the move to regardless of which finish execute is used. Is my understand of how finish execute works incorrect? When collapsing up the tree does it not skip unexecuted tasks? Should this be done a different way all together?

Product Version: Not Selected
Tags:
btree.png (41.1 kB)
attackdelay.png (90.4 kB)
more ▼

asked Oct 20 '14 at 05:53 PM in Blueprint Scripting

avatar image

Justin.Dooley
2.1k 104 72 163

avatar image Justin.Dooley Oct 24 '14 at 06:03 PM

try as I might, this is still happening. is someone able to explain how I should be preventing it from executing the move to node? maybe point me to the decorator documentation? There are some I'm not sure about like cooldown that sound almost appropriate.

avatar image VSZ Nov 16 '14 at 10:38 AM

Hey, just curious to know if you ever found the answer to this.

Your setup looks good to me, although I would have explicitly used a custom decorator checking for Pawn's attack delay

avatar image Justin.Dooley Nov 16 '14 at 02:55 PM

I never found an answer. At this point it is more of a small bug that I can live with until we get to Alpha. It is strange 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