How to get distance traveled while a value is true?

How to get the distance traveled by a child actor (or component) while a value is true?

Here is a way to do it :

Thanks, seems i got stuck for no reason.