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"

BotAI attack sequence


I'm trying to setup a simple AI bot who is moving towards the player, stop at him and attack. This sounds so simple, but turns out to be not as easy as I thought.

I thought I'm going to make a decorator, which should check if the bot is at the player location, but this does not work. Is this a good approach? If yes, please let me know how to fix my blueprint or please point me in a correct direction

Here is my setup: Behaviour Tree alt text

Decorator alt text

Thanks in advance

Product Version: Not Selected
behaviortree.png (418.8 kB)
decorator.png (676.1 kB)
more ▼

asked Jun 22 '15 at 01:39 PM in Blueprint Scripting

avatar image

64 12 17 21

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

1 answer: sort voted first

First of all you're using AIController's location while what you need to use is its controlled pawn (use Perform Condition Check AI, you'll get both the controller and pawn with it). This is probably why you're BT doesn't work.

Second, your current setup doesn't even require that conditional decorator - the Move node won't finish until AI is at the goal. You just need to make it move to the Goal Actor instead of Goal Location - just add an "actor" key to your blackboard, set it to store player pawn, and make the task go to that blackboard key.

Last but not least, the ideal setup would be like so:

alt text

I'll let you figure out the details ;)



more ▼

answered Jun 22 '15 at 01:53 PM

avatar image

MieszkoZ STAFF
7.3k 225 57 413

avatar image xhallix Jun 22 '15 at 01:55 PM

works like a charm when using pawn ;) thanks for the hin. I will recheck my tree also

(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