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"

State Machine Enter/Exit State/Transition order

I'm confused by the order events seem to trigger in a state machine when changing states. Here is a simple example:

alt text

In the states' details, I've added custom blueprint events to the Enter/Left/Fully Blended Events. I've done the same thing for the transition's Start/End Transition Events. All those blueprint events get hooked up to printString functions to see which order they happen in. And that order turns out to be:

  • State1 Exit

  • State 2 Enter

  • Transition Start

  • Transition End

  • State 2 Fully Blended.

Why am I getting transition events after State 2's Enter? The documentation is very light on details concerning when/under what conditions exactly all those events trigger. Can we get any clarifications on this? And while I'm at it, when does the Interrupt Transition Event happen?

Product Version: UE 4.11
states.png (9.6 kB)
more ▼

asked Jun 17 '16 at 07:02 PM in Blueprint Scripting

avatar image

61 3 4 9

avatar image shrikky Jan 14 '18 at 12:58 AM

Hey I have the same problem. Thanks for printing out the order I will need to verify it too. Did you solve the issue.

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

1 answer: sort voted first

This is a bit old, but I've done some experimentation and found this out:

Yes, normally the order is indeed:

  • State 1 Exit

  • State 2 Enter

  • Transition Start

  • Transition End

  • State 2 Fully Blended

    Basic 2-step process

In terms of basic theory, it seems Unreal Animation graphs require that you always be in exactly one state at any given time. Therefore, even if you have a transition between states that lasts 1 full second (for nice smooth animation blending) it seems Unreal will actually instantly switch you from State 1 to State 2 as soon as the transition condition is met. It will then "remember" that it needs to perform the smooth transition blending from State 1 to State 2 which has a certain duration of time. Therefore, it seems the following is happening:

  • Step 1: Unreal jumps to state 2 Which triggers State 1 Exit, State 2 Enter, and Transition Start Events immediately

  • Unreal waits for the transition blending to finish (Configured by whatever you set for Blend Settings Duration on the transition, default is 0.1s)

  • Step 2: Unreal Triggers Transition End and State 2 Fully Blended after the blended transition has finished.


One catch I've found is that it's possible for the transition to be interrupted. If there is another condition edge in State 2 that takes the tree to a different state (e.g.: State 3) you have to be careful, because Unreal will jump to State 3 immediately as soon as that condition is true. This means your nice beautiful smooth transition from State 1 to State 2 will be aborted. In this situation only the events from Step 1 (above) will fire, none of the Step 2: events will fire. Instead of Step 2, you will get the "Transition Interrupt" event, and then all the events for entering State 3 will trigger as normal. It would look like:

  • State 1 Exit

  • State 2 Enter

  • Transition Start

  • Transition Interrupt

  • State 2 Exit

  • State 3 Enter

The take-away lesson is be very careful about using the "Transition End" or "Fully Blended" events because there is a chance they will never be triggered if the State Machine switches to a different animation state before finishing the smooth transition blend.

more ▼

answered Sep 23 '18 at 05:46 PM

avatar image

86 2 5 10

(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