[SOLVED] Dynamic color change animation from a dynamic color array

Hello, first time post something here, look sometimes though and usually find answers or alternatives, but not this time.
First, I need to say that I know basics of how dynamic material instances, material colections and timelines work. Saying just so you don’t waste time explaining it to me (though any helpful information is greatly apreciated even if it is basic and I just simply missed/didn’t think about it. Just don’t want to waste anyone’s time).

Now to the topic itself.
Basically, I have a bunch of Button actors and a bunch of Blocker actors (gates) that can be opened not just by one Button each, but they each can be assined to any amount of Buttons and vice versa (basically a M:M correspondence).
I did so that my Buttons each have their own color that can be assigned in level editor. Each Button has array of affected Blockers (which it opens) and you need to be able to understand which Blocker is triggered by what set of Buttons.
So to solve this I made in Blocker Blueprint a map that has keys of Button object references mapped to values of color each of buttons has (now that I look at it I just could make array of buttons and get colors through their static mesh, but this is irrelevant, I anyways keep it like that just to make it easier to understand for now). And now I want Blocker to shine through every connected Button’s color in loop.

—> TL;DR <—: How do I make it so color of spawnable actor’s static mesh changes over time going through a dynamic array of colors (basically any number of colors from one to as many as I want). So I need a looped animation of color change going through color list, hope I explained it well enough.

I tried using Timeline with float track on loop, but it always stucks on two colors and goes only through them, also though about some possible answers through Tick Event or Actor Sequence (this one just can’t get any inputs so its useless). Timeline is my best bet, but it still doesn’t work as I need it too. :frowning:

Hope someone can help or at least explain, that it is imposible (I also don’t mind if you give me other ways to show what buttons can open what doors). Sorry for my bad English.

this is how you transition colors using a timeline. if you have an array of colors and just want to go to the next in the array then increment an int variable at the end of the timeline and use a get node. use a % modulo operation to make the incrementing int stay within the array.

if you have an array of 8 colors

7%8 = 7
8%8 = 0
9%8 = 1
10%8 =2


or reset counter at 8

Thank you, this worked perfectly. Didn’t think of using Timeline Finished pin that way.