Count time between two events

Hello,

I would like to count time between two specific events.
I have a vehicle and a traffic light. I would like to count the time from the red light on and the vehicle immobilization. Meaning, Traffic light BP- the time when the red light intensity is high and vehicle BP - the vehicle speed is 0.

How can I achieve this?

Initially

image

Then later

Thank you,

But I need to put it in a widget. So, I will ad each Get time in seconds in each BP and store the Time variables (A and b) and then in the widget I will Cast to each BP and call the variable to calculate the difference?

Worse case scenario, you need to display these times as the game goes on.

You have 3 ( say ) blueprints in the level that are collecting this information.

Give each an ID ( integer ). In the widget bind to ‘get actor of class ( your BP )’ and check the ID.

OK great thanks!

1 Like