I know that time is calculated in seconds, don’t worry. I was relying on it (that’s why I have time%2 to make sure that the time is every two seconds [I know I could have used posterizeTime()]).
What I did _not_ realise is that prior values are pre-expression values (which I discovered to my consternation when using another expression for rotating an object).
I actually don’t need this code anymore but I know now why it doesn’t work. The algorithm is perfectly good (I’ll explain it in a second) but I was relying on AE giving me post-expression values (like there is a post-expression graph).
Essentially I have two different layers of which I only want to display one at a time (so I’ve linked the second’s opacity to the first). Then the algorithm “randomly” chooses whether or not to switch the layers based on the previous state (it can reach back maximum eight seconds so four potential switches). It does this by weighting so it _must_ switch if all four previous “instances” have the same shape showing. Look at the mooshell I linked to on this document and you can see it in action.