From Bohemia Interactive Community
|
|
(One intermediate revision by one other user not shown) |
Line 1: |
Line 1: |
| {{RV|type=command
| | #REDIRECT [[dayTime]] |
| | |
| | ofp
| |
| | |
| |1.00
| |
| | |
| |gr1= Environment
| |
| |gr2= Mission Information
| |
| |gr3= Time
| |
| | |
| | Returns the current in-game time in hours. For a formatted version of time, see [[BIS_fnc_timeToString]].
| |
| | |
| | [[daytime]]
| |
| | |
| | [[Number]] - day time using a 24 hour clock, using fractions of hours.
| |
|
| |
| |x1= <code>[[daytime]]; {{cc|returns 16.5 given it is 16:30 (4.30pm) in game}}</code>
| |
| | |
| |x2= Get hour, minute, seconds:
| |
| <code>[[private]] _daytime = [[daytime]]; {{cc|assuming [[daytime]] returns 1.66046}}
| |
| [[private]] _hours = [[floor]] _daytime; {{cc| 1}}
| |
| [[private]] _minutes = [[floor]] ((_daytime - _hours) * 60); {{cc|39}}
| |
| [[private]] _seconds = [[floor]] ((((_daytime - _hours) * 60) - _minutes) * 60); {{cc|37}}</code>
| |
| | |
| |mp= Returns the current <u>local</u> ingame time in hours.
| |
| | |
| |seealso= [[date]], [[dateToNumber]], [[BIS_fnc_timeToString]], [[time]], [[skipTime]], [[systemTime]], [[systemTimeUTC]]
| |
| }}
| |
| | |
| | |
| [[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
| |
| {{GameCategory|arma1|Scripting Commands}}
| |
| {{GameCategory|arma2|Scripting Commands}}
| |
| {{GameCategory|arma3|Scripting Commands}}
| |
Latest revision as of 00:03, 25 June 2022