Aphrodite I like that algo you found there. Inspired I found a way to extend it beyond 32 elements. The idea is to use another array of 1's and 0's instead of just a number, and update the array with a simple function to add 1 in binary.
https://dl.dropboxusercontent.com/u/542 ... count.capx
It looks like counting sums of zero works, but it's also counting the case of none of the numbers added together. That case could be discarded by not using it when loopindex=0.
Edit:
Under further tests something seems broken with my capx.
R0J0hound
I didn't fully understood the capx (didn't had much time to look at it today), but instead of using an array of 0 and 1, why not taking int(Array.CurX/(2^loopindex))%2 instead of the getbit, I think it does the job over 32 elements(unless I got my math wrong).
Also by adding a condition "loopindex > 0" at your 11 event, it does not add the empty case for 0.
EDIT: Tried with 9, indeed not all solutions are found
Edit2: I begin to see the concept, your bits array help to choose the values to show it seems, I'm still strugling to understand why no all values are counted though