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"

[Possible Bug] AnimBlueprint State event not firing when transitioning to Entry state

UE4 4.2.0

alt text

We're having a situation where we want to call a Blueprint Event when entering and exiting a State. In the image above you can see that the Moving state has an Entered and Left State Event. For some reason these events do not fire when Moving transition to Idle when Idle is the entry point. All other state transitions work.

If I switch the Entry point to start at Moving, without any other changes, the events fire flawlessly.

Note that the transition to Idle do happen. The idle animations are playing. It is only the events that do not fire.

In short: Enter/Left State Events do not fire when they are defined in a non Entry state and this state transitions to an Entry state.

Product Version: Not Selected
Tags:
more ▼

asked Jun 17 '14 at 02:39 PM in Bug Reports

Denny gravatar image

Denny
959 24 28 64

Denny gravatar image Denny Jun 17 '14 at 03:31 PM

It is possible that I have completely misunderstood the design of State Machines. I had the impression that if a unit is currently in a state, it will move from that state to whatever next there is. It seems however that my state machine always restarts at Entry and traverses the graph when a boolean is changed....

It is also possible that my Animation Montage is resetting the state machine for some reason. (note, I only have a state machine and nodes within it, nothing else)

Denny gravatar image Denny Jun 17 '14 at 04:16 PM

It seems the problem to this report had nothing to do with what I have messed with before.

If you place a Blueprint in the world, which has an Animation Blueprint connected to it, it seems the State Machine resets and traverses the graph if you change the booleans in the Details panel of the placed object.

It all works fine however, if you use an input to change the value, like pressing W or Spacebar.

Note to self: Don't debug Blueprint behavior by using the Details panel in Simulation/Play.

Edit alt text As the image says, if you change values in the details panel during simulation/play, you get weird behavior. I guess this has to do with some kind of reset of the actor.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hi Denny,

Based on your comments about the setup, this seems like expected behavior. If the bool "Is MOving" is tied to the moving state's Transition Rule then it could become locked into a state. Typically we do not expose variables that are involved with animations, as they are altered dynamically by input changes from controllers/environments.

if you change values in the details panel during simulation/play, you get weird behavior

Animation BP values are not really designed to be set manually like that when already playing. Is there a reason you would need to set it in the details panel at runtime or was this found during testing?

Cheers!

Alexander

more ▼

answered Jun 17 '14 at 08:36 PM

Alexander Paschall gravatar image

Alexander Paschall ♦♦ STAFF
13.7k 309 24 227

Denny gravatar image Denny Jun 19 '14 at 10:39 AM

Hi Alexander, thank you for your reply.

I noticed I did not mention that I am driving the Animation Blueprint with a Character Blueprint, which I place in the world. All booleans in the Animation Blueprint is driven by the Character Blueprint.

The reason why I went with the details panel is because I wanted to test all the transitions on the character after placement, there is no controller yet to drive the character as it will be an enemy character. I thought it would be no difference if I manually clicked the boolean value rather than having an input listen to a keypress and then doing the same thing.

To clarify there was no boolean logical faults in the state machine as it works as intended when using inputs to drive the values. If you change booleans in the details panel however, on a placed object, the state machine will restart and traverse from the entry point again.

I have used the details panel before, in some of my personal projects, to do simple things like increasing the number of inventory items a character has access to. I didn't have any problems then, so I thought I could do the same here.

Alexander Paschall gravatar image Alexander Paschall ♦♦ STAFF Jun 20 '14 at 03:32 PM

Hey Denny,

If you change booleans in the details panel however, on a placed object, the state machine will restart and traverse from the entry point again. I have used the details panel before, in some of my personal projects, to do simple things like increasing the number of inventory items a character has access to. I didn't have any problems then, so I thought I could do the same here.

That reset is caused by the way the logic of execution flows in the Animation BP. It will happen because when switched on from off, the BP is being to to restart that execution again.

Exposing variables to be altered for easier setting/testing is perfectly acceptable to do with the editor. You may just see weird results from animations like what you have seen because checking on the bool in the details causes it to be hard locked to that setting. So if you set one up to say that IsFalling is always true, then the character would become stuck in a "falling" state even with new input that would override a normal setting.

Let me know if this helps.

-Alexander

Denny gravatar image Denny Jun 20 '14 at 05:48 PM

Thank you Alexander, I now have a better understanding of how things work in the background.

(comments are locked)
10|2000 characters needed characters left
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