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"

AI and animation


I have done an AI, it is working well if we are server but not well if we are client. In fact, the client don't see attacks animation of AI (only the server see it). To play animation I use montages, they are played in a blueprint that is called in the AI tree when it is time to attack. What can I do to make the client see that the AI is attacking ?

Thank you ! Kind regards

Product Version: UE 4.20
more ▼

asked Nov 21 '18 at 06:10 PM in Using UE4

avatar image

12 1 3 7

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

1 answer: sort voted first

I solved my problem ! So, I am not sure that my solution is the best way to do that but I do the following things and it works :

-in my case, the problem was that when the AI attack it was supposed to play a montage of the animation. And this was supposed to be done in a behavior tree task. Only the server execute this task and so only him can see the AI playing the animation (it is what I understood, correct me if it is not exactly the case)

-to make the client execute the animation, I play the animation montage in the AnimBP of my AI. In fact, in the behavior tree task that is execute when we attack, I delete the original play montage node and replace it by setting a variable "IsAttacking" in my BP_AI. I replicated this variable.

-In the AnimBP, I test if this variable is true. And when it is then I play the montage. I only do it once to be sure he is not playing it each tick and blocking. Then after the montage is played I set is attacking to false.

So, it works like that for me but as I said it is maybe not the best way to do it. If anyone have a better solution please post it.

(I am sorry for the double post but I wasn't able to find my first post so I though that it wasn't posted)

more ▼

answered Nov 22 '18 at 02:45 PM

avatar image

12 1 3 7

(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