Imagine that I’m making a fighting game and I have lots of animated characters. Each character has standard moves such as punch and kick and then a few specialty moves. I’d like to express the available animations for a character indirectly. I also have lots of animations for the same move that are all not the same length.
Unfortunately I can’t find a way to do lots of complex logic in order to decide which animation should play.
-
As a sample, in the animation graph, I can use a “Select from Int” node with many animation sequence nodes feeding into it and then I use an integer to select from them. This works. But the actual logic I need is the combination of five different variable and random numbers. Branching is not allowed in the Animation Graph. So I looked for something else.
-
I explored the Montage feature and watched the youtube videos and maybe I’m looking too far into the example but it looks like it is for hard coded animations. The timeline is fixed. I’d like each section to represent a set of animations that I can select from based on complex logic such as which character it is, and various state. But it doesn’t look like it works that way.
-
Today I saw that an an actual hard coded animation sequence has an optional pin that you can check so that the anim will take an Animation Base as an input. So I tried using the Event Graph with branch nodes and an animation variable with the type “Animation Base”. Think of it as a massive set of if-statements in the Event Graph that all set a variable that says which animation sequence to play. That failed. As soon as I changed the animation base reference while the animation sequence was playing, the whole engine crashed.
I expect that the most common animation use-cases will be handled easily but this has me on my fifth try ( I only showed three above). So what am I missing that makes this easier? I am a veteran C++ programmer but the C++ has it’s own complexities and what I’m doing should be very common across many users.
Again, what am I missing?
Scott