What is the best approach for an array of animations? help

Hi guys,

I use UE 5.3, blueprints, remote control api + http requests

I am still pretty new to UE. I am currently working on a CG + livestream from studio, like some sort of interactive broadcast. My scenes are pre-made in sequencer and the whole broadcast is three shots switching between each other. One of these shots when played should trigger one of 38 extra animations, prepared just for this shot. As an example, I’ve made some random integer in range blueprint for another shot, where animation is selected randomly among six different.

I am trying to do the same in another sequence,
However, I am not sure it’s a good approach for another shot + 38 animations, as I need specific animation to play each time, which is decided via external device and http request. In this case, I can create 38 custom events and then just trigger each of it and it will be easy to find it, but I assume it’s a super amateur way, which suits only for few animations, not 38, I guess it can be a lot of mess in blueprints…

So, how do I do a sleek version of array for 38 animations, so I can trigger just one custom event with additional body, like “trigger this event, sequnce #20” ?

I am sort of feeling there’s a way on the surface, but what is the best way?

Will be thankful for any help/tip

This is probably the simplest thing you can use:


Add a list of all your sequences to the array.

1 Like

@PREDALIEN thank you for the tip. What is the input for in your custom event?

This is your sequence index, just call Custom Event instead of Switch on Int.

image

@PREDALIEN Awwww, I got it !!! Thanks, that is indeed a cleaner way for my first case…

But I have another case, where I have one shot where everything is the same, however http request comes to call specific subsequence. There are 38 of them. I’ve prerecorded it in sequencer and I have a folder with it. Now, I’d like to expose it in blueprints, so external device can call to array and pick required sequence with http request.??

You just need to connect the index from your http request to the index in the event, instead of using a random node.
38 sequencers need to be added to the array from which the desired one will be taken under the desired index.

You can also add a little convenience and use a Map container instead of an Array, and store sequencers in it under a unique name (key), then you can call the desired sequencer by passing the name of the sequencer you need via http.

1 Like

Thank you, saved me a bit of time spiking :slight_smile: I will definately do map container, however i was wondering if the method 1 (array) can be applied to an array of textures that i want to keep in widget blueprint as a function, how do i connect it?

An array can store any type of data, including textures.

But I don’t quite understand why you need to wrap texture acquisition in a function. Do you want to use something other than an array index as input?

You can get a texture without a function by specifying the required index, similar to how you launched the required sequencer from an array.

I was able to create a map with string ↔ level sequence and i can call it from anywhere with passing on the index number, its super cool, thank you!