I’m wondering if there is a blueprint function that gets me something like Win32-Api “GetTickCount” (time in milliseconds since Windows started), but for the UE4 game (see GetTickCount function (sysinfoapi.h) - Win32 apps | Microsoft Docs ).
According to this Time | Unreal Engine Documentation there exist only blueprints that will have their time counter reset if I load another level.
EniGmaa
(EniGmaa)
December 23, 2016, 10:17am
2
Mosel3y
(Mosel3y)
December 23, 2016, 11:40am
3
There’s a UTCNow node which returns the current date and time as a DateTime structure.
If you store this on Init in your gameinstance class as StartTime or whatever, then whenever you need to know how long it’s been running just do UTCNow minus StartTime, and then use the GetTotalMilliseconds node.
1 Like
There’s a UTCNow node which returns the current date and time as a DateTime structure.
If you store this on Init in your gameinstance class as StartTime or whatever, then whenever you need to know how long it’s been running just do UTCNow minus StartTime, and then use the GetTotalMilliseconds node.
That’d work, but isn’t using fully featured time functions a bit heavy? Compare to two floats, I mean?
Mosel3y
(Mosel3y)
December 23, 2016, 11:47am
5
How often will you need to call it though?
Delta1
(Delta1)
December 23, 2016, 7:17pm
6