In this setup Random number defines Y position of Empty, which is shrinkwrapped-constrained to "Array of stairs".
I'd like to save Z value (orange circle) in memory, when the first positive number will be generated (green circle) and keep it until animation ends. And please, do not modify Random number node.
EDIT: I've added another attribute
to workaround saving value from previous frame. Looks messy, but works.