Hi, I'm a C2 newbie... I have a project that requires a button to be clicked, that when clicked will look through the entries in an array, all of which are set to either 0 or 1 (i.e. inactive/active) and randomly pick one of the entries that is active.
Then, take the array position of that entry and use that to set a frame on a sprite.
For instance, if there's an array with a width of 5, (0,1,2,3,4) and they are set to values of (0,1,0,0,1)... it should select at random either array entry 1 or 4, and then set the image frame to frame 1 or 4.
How can I do this? I've tried a bunch of times in various ways but it never works right for me.