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"

How to change flipbooks via ai behavioral tree

Hello

Is there any way to change flipbooks in 2d ai character in its behavioral tree? I keep wondering how to approach this problem. In fact I should ask this question differently: How generally change flipbooks in 2d ai Character?

Product Version: UE 4.15
Tags:
more ▼

asked May 06 '17 at 10:07 AM in Blueprint Scripting

avatar image

Asterat
1 2 5

avatar image MieszkoZ STAFF May 07 '17 at 12:27 AM

To do it via BTs all you need to do is to create a BT task or a BT service (only nodes that do actual work) and have them do the flipping.

Regarding general approach, I'll leave it to someone that knows :D

avatar image Asterat May 07 '17 at 09:08 AM

I'll try this out as soon as I get my hands on the keyboard. By the way: it's really nice to get a reply from You! :D

avatar image Asterat May 09 '17 at 11:49 AM

So... after many tries all I can do is simplify my question to: how to get an actor flipbook component and set its flipbook in the behaviour tree. I assume the best (and maybe the only) way to do this is via Service. Still no idea how to make it happen. All the topics that are related to this one have no answers either.

What I've done is: Behaviour Tree is setting a different name variable for 3 different actions. Actions are: Idle, Combat and Searching. If player character is in line of sight it's Combat and name variable is set to "Combat" aswell. If player character isn't in the line of sight it's Idle and name variable is set to "Idle" aswell. Searching is just running to the last location where player has been seen. Name variable is set to "Searching" aswell.

Name Variable is saved as BlackboardKey. What I'm struggling with is how can I get thisFlipbook Component out of AICharacter.

alt text

test.png (314.3 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

It's working now :) If anobydy is curious how I'll share the solution.

more ▼

answered May 09 '17 at 01:28 PM

avatar image

Asterat
1 2 5

avatar image zlCheckmate Jul 26 '17 at 11:36 PM

I would like to know please sorry I'm a noob and learn from examples mostly and well there isn't an example anywhere for me to learn form sadly. :(

avatar image captainvera Dec 05 '17 at 01:12 AM

Seriously @Asterat, you yourself say that this is the only topic at that no other is resolved and you couldn't post the answer?! :/

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

Well, since I had this problem and none of the threads I visited had the answer here it is:

alt text

You basically have to have an event at the beginning and end of execution. You just make the Variables public and editable and it's easy to customize via Behaviour tree!

Cheers

image.png (160.3 kB)
more ▼

answered Dec 05 '17 at 04:54 AM

avatar image

captainvera
1 1 1

(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