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. 

Abort current animation in state machine

Is there anyway to abort an animation/state within an state machine? I have created the following state machines in an Animation Blueprint: alt text

Now, The Moving state contains 3 different animations in a blend space (Idle, Walk and Run), The attack holds one animation and the same for Shaking. The problem is that if the "Attacking" state should be fired and the "Shaking" animation is currently being played, the "Shaking" animation should stop so it can fire the "Attacking" state instead.

Does anyone know if this is possible?

Within the character blueprint (which is using this BP animation) the shaking state gets set randomly, but as soon a target is within sight the Attacking state gets fired, which means that it can happend in the middle of the "Shaking" state.

Thanks for any tips!

Product Version: UE 4.19
Tags:
anim-graph.jpg (71.0 kB)
more ▼

asked Mar 31 '18 at 08:08 PM in Blueprint Scripting

avatar image

Araw88
5 2 5 8

avatar image chiefGui Mar 31 '18 at 09:43 PM

Ha! I do have the same doubt. Waiting for an answer.

avatar image Araw88 Apr 01 '18 at 07:49 AM

I managed to solve the problem in my case. Hope the answer works in your and others case!

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

1 answer: sort voted first

I managed to fix it like this:

alt text

In the Character blueprint the AI can attack and chase the player. In this case I don't want to stay in the current transition. So in the transition itself I check the value of these variables. The variables are updated by the Blueprint Update Animation event:

alt text

I highly recommend watching this video with Wes Bunn as well as an alternative (better) way to do it https://www.youtube.com/watch?v=YVC-DL9Ibf0

more ▼

answered Apr 01 '18 at 07:47 AM

avatar image

Araw88
5 2 5 8

(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