Animation Nodes: Wait x seconds, output 0, then output random number (for input to object instancer) I've been trying to figure this out for a while, but I'm kind of stuck. I have an Object Instancer that duplicates an object a random number of times (between 5 and 30) 

I want to have this number to stay constant for x amount of time before resetting (0) and then chooses a new random number.

I've gotten as far as to have the number of instances change every x frames (see attached Tree Node), but I can't figure out how to make it go to 0 before picking a new number.

Any help would be greatly appreciated.
You can multiply the output of the Random Number Node with a value that is one for all frames except those that are multiple of $x$. We can detect if a value is a multiple of $x$ using modulo as follows:



Th result of the previous node tree is as follows:



The number of objects briefly goes to zero and change into a random number every 10 frames.