Search the Community
Showing results for tags 'time'.
-
2nd try: some weeks ago I asked the support, how to list my flight-times. They said, look into logbook.lua. So I wrote a little script to list my flight-times descending and formatted. Maybe usefull for others, must be executed in your saved-games directory. -- personal logbook for flights DCS -- execute this file in do C:\Users\{{YOUR_USERNAME}}\Saved Games\DCS.openbeta\MissionEditor -- to get the exact flight times of variant models. dofile("logbook.lua") function secToHMS(sec_o) local sec = math.floor(sec_o) local h = 0 local m = 0 while sec >= 3600 do h = h + 1 sec = sec - 3600 end while sec >= 60 do m = m + 1 sec = sec - 60 end sec = math.floor(sec) local ret = str_pad_left(h, 4, "0") .. ":" .. str_pad_left(m, 2, "0") .. ":" .. str_pad_left(sec, 2, "0") return ret end function str_pad_left(s, l, char) while string.len(s) < l do s = char .. s end return s end function compare(a, b) return a[2] > b[2] end function roundNumber(i, d) local mult = 10 ^ (d or 0) return math.floor(i * mult + 0.5) / mult end branch = logbook["players"][1]["statistics"] print() print("my flight log:") print() flights = {} total = 0 for k, v in pairs(branch) do if type(v) == 'table' then time = math.floor(v["flightHours"]) total = total + time table.insert(flights, {k, time}) end end table.sort(flights, compare) for i, e in pairs(flights) do perc = roundNumber(e[2] / (total / 100), 2) print(str_pad_left(e[1], 15, " ") .. " : " .. secToHMS(e[2]) .. " ~" .. perc .. "%") end print("") d = roundNumber(total / (24 * 60 * 60), 2) print((str_pad_left("total", 15, " ") .. " : " .. secToHMS(total)) .. " (~" .. d .. " days non-stop)")
-
- stats
- logbook help
- (and 4 more)
-
1) Quitting DCS with the exit symbol [-> does restart the game, it does not quit. Something wrong? 2) Saving the .lua file for my carefully made adapted profile in options does not work always .... is that a bug? 3) i get a time left of 2 days, while i bought the licenses officially. What's up? Must i reinstall the lot and how? PS i had the 2.5 version already installed and just started it, and downloaded the updates and bought stuff via the normal procedure. It says 2.7. now somewhere. ! ADDED for point 1): i found it, EXIT at the right side works OK Thanks
- 3 replies
-
- limit
- saving options
-
(and 3 more)
Tagged with:
-
I'm working on a project for Universal Apache Training mission, and I'm having issues with the following: 1. If player overloads Apache I want a message to pop-up that the Apache is too heavy 2. I have a "race" in which you have to fly as fast as possible without crashing and I want to have a pop-up message at the end which tells you how much time it took the player (and potentially read highest speed the player flew at as well as lowest altitude). Hopefully someone can help me with this as I'm really bad at coding
-
- mission editor
- me
- (and 4 more)
-
I'm creating a mission where a radar controller is talking you into release position. I have zones worked out funneling the player into release position, but am having trouble getting the triggers to work right for the talk on. I have a repetitive trigger identifying whether you are in the "come left" "come right" or "on course zone" and turning on a flag for whichever one. I have a switched trigger telling you what you need to do depending on which zone you're in and then turning off that original flag so the switched flag will refire reminding you that you're still off or on course. Trouble I'm having, it's just rapid fire "come left come left come left come left". I set a "TIME SINCE FLAG" to 3, and they won't fire at all. I tried again with a second trigger giving that time since flag, firing a second flag which fires the audio call. That third one turns off all flags. But sadly, this one didn't work either.
-
Hi, actually in DCS MT there is only the start-time in the debriefing-screen displayed. Sorry I forgot to switch to English before flight. It would be nice to see the full flight-time in the marked box: start, missions end and duration. Thanks and best regards!