Sepluk demonstrate how you can use Xpresso in C4D to activate a boolean on selected frames. This set up will allow for a lot of customization and options and is a great thing to know as you can use it to trigger anything on selected frames really.

There is also a bit in here about how you can hold the state using the mono flop node and offers a practical example. Admittedly, Sepluk notes to a previous tutorial of his where he covered some of the same concepts only using Python instead of Xpresso. You can check out Output a Random Integer in C4D Within a Specific Range of Selected Frames for that walkthrough.