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"

BUG: maximum number of State Machine connections?

Using UE 4.7.2

I have a very complex AnimGraph State Machine, which controls all sorts of stuff.

I was messing around making new connections today and noticed that, when I did, I was able to break other connections entirely by accident.

Here's what I eventually did: I had everything working as expected. I made a new connection between two states, and I set the transition rule to False (i.e., the State Machine should NEVER be able to take this transition), and other transitions in the State Machine started to break; events weren't firing like they should, transitions were getting interrupted, etc.

Now, correct me if I'm mistaken, but a State Transition with a rule of False should be EXACTLY the same as no transition rule existing. As long as the new transition has a rule of False, why should the behavior change AT ALL?

What's even stranger is that the desired behavior will eventually work... sometimes. But it's not reliable. And once I delete this blank connection, everything returns to normal.

Where this gets even weirder: the transition rule itself isn't on the State that it breaks! The State whose behavior begins doing unexpected things is not the one I'm creating this blank connection on, it's a completely different state. It's like the number of connections from this one state has gotten so high that the engine itself just throws its hands up, says "I'm not managing all of that", and starts ignoring other state transitions it's supposed to take.

Product Version: Not Selected
Tags:
more ▼

asked Mar 08 '15 at 11:21 PM in Bug Reports

avatar image

RhythmScript
243 20 24 36

avatar image RhythmScript Mar 08 '15 at 11:33 PM

Followup: I tried making the "blank" connection again, and then deleting a different connection from the same node (just to make sure it didn't have something to do with how UE4 handles always-false transitions); the behavior works as it should again

It seems that no matter what the configuration is, a single State Machine state cannot have more than 9 outgoing connections. Once you add a tenth, other transitions start breaking.

avatar image RhythmScript Mar 09 '15 at 05:12 PM

For anyone else facing this, the workaround is just to "pass through" to another conduit or state. If I need A to transition to B but I've already got 9 other transitions, I can just have A transition to a Conduit based on the transition rules for A>B OR A>C, and then feed that conduit out to B and C based on the specific rules. At least that's what worked for me.

Still, if this is a known limitation, it would be nice if the engine alerted you that you had too many connections rather than just dropping them without warning.

avatar image Steve Hardister ♦♦ STAFF Mar 09 '15 at 08:49 PM

Hi RhythmScript,

Can you provide the assets so we can isolate the problem and determine if this a bug with the engine. (Being unable to reproduce the issue here, I posted a "best guest" comment before realizing the best way to accurately gauge this is with the assets themselves.)

Thanks

avatar image RhythmScript Mar 09 '15 at 09:15 PM

I'll put the entire project up on my dropbox tonight with detailed repro steps, but I warn you: my AnimGraph is like a bowl of linguine. My commendations to anyone on Epic staff who can make heads or tails of it even when it DOES work how it's supposed to :P

avatar image RhythmScript Mar 10 '15 at 03:20 PM

okay, so here's the project.

https://www.dropbox.com/s/2grkm339jjwyik7/MayhemLeague%204.7.zip?dl=0

Play in editor; while moving, hold the shift key. The character should leap through the air, then when he hits the ground (continue holding shift) he should begin to fly along the ground. While flying, press spacebar; the character should do a frontflip-jump, then resume flying along the ground. This is the intended behavior.

In the state machine, when you press Shift while moving, the game sets a bool flag that tells the character to "dodge". Once the character is in the Dodge state, the game checks to see if the player is still holding the shift key when the character lands; if so, rather than playing the dodge landing, it sets a flag for Initiate Dash which transitions the player to the Dash State (by way of a second Dash Begin state which plays a special anim).

When the player is dashing, pressing jump will set a flag that indicates that the player has double-jumped and transition him to the double-jump state. From this state, the game checks to see if "Resume Dashing" is true; if it is, at anim end, it re-cycles back into the dash state.

Now here's the bug: from the DODGE state (not the Dash state), create a new connection. You can drag it to any state; you can create a new State, even. The transition rule can also be whatever you like; to prove a point, set the transition rule to False, so that the transition you've just created off of the Dodge state cannot EVER be taken.

Now, do the dashing-jump example from the beginning again; note that now, when you try to jump, instead of doing the proper frontflip anim, the game just sort of barely hops the player above the ground without any animation change at all.

Why is this happening? You created a new transition--which cannot even be taken--from the dodge state, and it's breaking transitions from the dash state.

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

1 answer: sort voted first

Hi RhthymScript,

Using your files and following your concise instructions, I was able to reproduce your issue and have reported the issue as a bug in the following report JIRA [UE-11958]. Should this be addressed in a future build, an update will be added to this post.

Meanwhile, you may be able to split the logic between two "Dodge" States (ie. Dodge1 and Dodge2) with around 5 connections each.

Thanks for your detailed report of the issue.

more ▼

answered Mar 16 '15 at 08:41 PM

(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