Download

Setting looping animations sequence start point

Hi,

I have a certain number of characters with a run animation loop for their movement.
Right now, they look like they are marching.

Since they spawn practically at the same time, their runs are in sync as well. To avoid this, I’d like to start their looping run animation at a random point in their animation sequence.

Is there a way to “set current time” or “set start time” using blueprints?
(if not, maybe in C++ ?)

(It would be better to avoid montages if possible, since there can only be one montage playing at a time, and I’m using it for their attacks)

Thank you in advance.

ummm, maybe, you put a boolean with a branch between animate node and the final pose. You can put this boolean to true in many ways.

You have 2 options as I see it.

  1. Spawn them not at random intervals after game start.

  2. Add a small random delay to their activation before they start running.

Hard to help more without more info.

Ops! Sorry if I was not clear.
I understand that I could spawn them at different times, but for this application they have to be (practicality) at the same moment.

As an example, let’s say I have a simple state machine like so:
example01.PNG

with just a simple walk loop inside the “run” state:
445e8383d2bbd01df9c939165916edc4d5de54e3.png

Say I have about 5 enemies using this simple set-up that spot the player at the same time and start running towards him at the same time as well.
The way it is now, all 5 run animations end up in sync and they look like a marching band.

Would there be a way for me to set what the frame (or time) I want my walk animation to start? (so that I can set them to different numbers)

Thanks again!

I don’t know about starting at another frame.

But I can tell you this, it ruins immersion when 5 enemies start running at the exact same time. So you really should add a random delay after they discover you, maybe based on distance?

Sorry, that sounds way too bossy.
I just think that randomness adds to the experience. Sorry I can’t point you in another direction :slight_smile:

No worries Rasped, I understand your concern. And I appreciate the input nonetheless.

The situation I described was simply painting an example scenario to illustrate the kind of control I’m trying to get with my animation sequences.

I still wonder if there’s any way to set the starting frame. It doesn’t seem to be the case, but it might be an interesting feature to add to Unreal.

If anyone has any idea on how to do it, please feel free to chime in!
Thanks!

I am having the same problem - all my zombies walk in step, like a marching band… I can delay when they start walking… but in certain spawning situations it could be useful to set the starting frame or time of the walk loop…

Thanks in advance for any tips/advice

Same prob, looking for a good way to fix it. I want to try avoid having multiple walk animations.

Not sure if you guys ever found an answer to this, but I was just working on a similar situation and think I found a solution that may help.

So in my animation blueprint for my character… in the state machine I clicked on my Idle animation for my character, which is the one it will play when it is created… and they would normally all start at the beginning and all move in sync… that’s not what I wanted either. I wanted to randomize the start position of that Idle animation. So after clicking on the animation, in the state machine, in details panel I checked the box (As pin) Start Position. I created a variable called “RandomStartPostion” for example… In the state machine Graph for that Idle state at attached that variable to the start position pin of the idle animation. Finally, in the Event Graph of the animation blueprint… I created a “Event Blueprint Initialize Animation” node and set the variable I created to a random number between 0 and 1. So when my level loads now each of those pawns have a different Idle position and are not all in sync which looks a lot better.

Hope this helps.

Thanks jaremi76, works like a charm