C3 / Windows 11
I have 17 animations.
Each animation has between 5 and 40 frames.
Depending on which button is tapped or clicked a var is changed triggering an animation.
When the user taps that button I need all the frames to spawn in a 4 x ? grid.
4 across and however many down - because setting up with copies of a sprite, each set to a different frame - doesn't work.
If I don't spawn them, there are other issues with the frame selection. If I have 40 copies of the sprite each with a frame selected and there are 40 frames in the that animation it all works hunky dory. BUT If I click the next button and there are only 10 frames, then I get the 10 frames and then frame 10 is repeated 30 times. Not Ideal.
BUT then it gets even less ideal. If I click on the first button again - the one with the animation with 40 frames - I get the first 10 frames and the 10th frame repeats itself 30 times. [Mother had no idea there would be days like this!]
So, I thought, what if I told the program, when button 1 is pressed and var 1 is selected, look at how many frames there are in that animation 1 and spawn a 4 x ? grid of all those frames. And then when button 2 is selected, destroy all those frames and spawn all the frames in animation 2 in a 4 x ? grid.
After 3 days - I'm rethinking my life choices.
And just for an added level of difficulty, in the future I want these to scroll vertically. And they can't be random .... dear God - every demo seems to be random.
Please tell me there is a demo for something like this. I'm not sure how many more brain cells I can spawn.