Help with random Spritestacking animations

Please help,

I am thoroughly confused as how to randomize spritestacking animations. I have done ranom animations hundreds of times, but none of that seems to work. I tried the most basic, inefficient system to try to understand it, and still, nothing is happening.


I have the starting value, which should go to a ‘Go To’ input on an animation behavior, but I don’t know how to make the behavior that it inputs into random.

I don’t understand why this doesn’t work.

-Ember.Y

2 Likes

I can help you with it and anything else you need help with just let me know.

1 Like

The value is being inputted before the switch is turned on. This is due to frame order, the top action happens before the bottom one. If for example you moved that Extractor below everything else, you’d see it work fine.


This is what you want (also simplified by just using a router set to “Randomize next route”)

1 Like

Code Alpace vs code epic sigma battle (off topic)

Uh, @CodeAlpaca, the input goes through, but it only ever picks the first output.

Click the Router, then select the option to randomize the route

1 Like

Yeah, did that, Idk why it only outputs on the 1st one.

I tried hooking a randomize to it and it still only outputted one.

Can you send a screenshot of the code? I’m guessing it’s a frame order issue

1 Like

Hook up the Extractor output to the ”Select” input and it should work

1 Like

Holy how. It works!!

Thanks Code Alpaca!!


Added a ‘Get one’ to the select so the frame order isn’t wonky. I’ll post a picture of the stack on my art station!

The Number behavior going into the router doesn’t seem necessary, seems like you can just directly connect the Extractor, but whatever works is good

Yeah, but fswr the flowers looked weird ancdclipped. I’ll see if I can find out why and maybe fix it. Always good to simplify!