Logic Machine Forum
Display time of object - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: Display time of object (/showthread.php?tid=3769)

Pages: 1 2 3


RE: Display time of object - nmedalacabeza - 23.01.2023

my knowledge of lua is very scarce Sad to do such programming. Thanks


RE: Display time of object - admin - 24.01.2023

Map this event script to the fuel level % object. Change 1/1/1 to the object that stores the remaining time text.
Code:
value = event.getvalue()
totaltime = 22 * 60 * 60 -- 22 hours in seconds
remtime = totaltime * value / 100

formattimealt('1/1/1', remtime)