How can I make a distance travelled widget stop

I’m trying to implement a distance travelled widget for a vehicle, and I got as far that it is now counting the distance. But I want it to stop counting when I press a certain button. For example, the brakes. Is there a way to do this?

Maybe clamp the distance between 0 and your current distance while pressed, or set it repeatedly to the current distance on press button

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.