Save value on first occurrence in Animation Nodes 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.
Attributes can be stored in memory during the life time of the blender instance as described in this answer. In this particular case, the logic is as follows. We have two variables occurred, storedValue:


If the current frame is equal to the start frame, reset storedValue to some initial value and reset occurred to False.
If trigger value is positive:


If occured is False:


Set storedValue to the value.

Set occurred to True.