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"

Animation BP for actors

Hi, i want to use an animation BP for my enamy actors but when i spawn the actors just the first one are playing the animation and the rest of actors just copy him. What can i do?

Product Version: UE 4.19
Tags:
more ▼

asked Apr 01 '18 at 09:51 PM in Blueprint Scripting

avatar image

CrIsTi1212
1 2 4

avatar image ThompsonN13 Apr 01 '18 at 10:08 PM

What do you mean? They are copying him and playing the same animation? Whats the issue? If all actors and being animated then the anim bp seems to be working. It could be an issue with how you programmed states if they are playing an anime they arent meant to be. Without a better description of whats happening how are we meant to help

avatar image CrIsTi1212 Apr 01 '18 at 10:16 PM

I use a collision box to start the animation when the player is close to actors but this stuff work just for the first actor

avatar image CrIsTi1212 Apr 01 '18 at 10:19 PM

And if the first actor starts the animation the rest of actors just copy him

avatar image ThompsonN13 Apr 02 '18 at 12:31 AM

Its gotta be an issue in your blueprint script but wihout seeing how you set thinns up its hard to say

avatar image CrIsTi1212 Apr 02 '18 at 02:46 AM

In actor BP i set a variable to true when player character begin the overlap and false when over the overlap. In animation BP i cast the variable from actor BP and with her i set a new one that i use to ener the state.

avatar image gk0r Apr 03 '18 at 09:47 AM

Create a new project and re-create the problem. Zip Config and Content folders along with the .uproject file and upload here.

avatar image EvilCleric Apr 03 '18 at 02:23 PM

Are you making sure that the player is the one overlapping? If both are pawn and you didn't check either through casting or through a tag, the enemy could be triggering the animation and not the player.

alt text

1111.png (107.4 kB)
avatar image CrIsTi1212 Apr 03 '18 at 04:03 PM

alt text

bp1.png (274.3 kB)
bp2.png (410.0 kB)
bp3.png (349.7 kB)
avatar image EvilCleric Apr 03 '18 at 04:18 PM

Try this:

1 - disconnect the BP animation update in your animation BP (this means the event graph will do nothing)

2 - on the event overlaps, get your mesh -> Get Anim Instance -> cast to ZombieAnimation -> set Can attack.

So basically, your actor BP will set directly the canAttack variable in your animation BP.

Something like this:

alt text

Don forget to disconnect the update event in the event graph in your animation BP.

new.png (174.0 kB)
avatar image CrIsTi1212 Apr 03 '18 at 04:35 PM

Thanks dude it works!

avatar image gk0r Apr 04 '18 at 11:11 AM

Did that fix the problem? Because there is so much wrong with the rest of it...

avatar image EvilCleric Apr 03 '18 at 05:09 PM

Just to add one more comment.

If you wanted to keep the logic in the animation BP's event graph, you should have used something like this, instead of all that "get all actors" mess:

alt text

newnew.png (137.1 kB)
(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