daytime: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - "^#redirect \[\[" to "#REDIRECT [[")
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
#REDIRECT [[dayTime]]
 
| ofp |Game name=
 
|1.00|Game version=
 
|gr1= Environment |GROUP1=
|gr2= Mission Information|GROUP2=
|gr3= Time |GROUP3=
 
| Returns the current in-game time in hours. For a formatted version of time, see [[BIS_fnc_timeToString]].  |DESCRIPTION=
 
| [[daytime]] |SYNTAX=
 
| [[Number]] - day time using a 24 hour clock, using fractions of hours. |RETURNVALUE=
 
|x1= <code>[[daytime]]; {{cc|returns 16.5 given it is 16:30 (4.30pm) in game}}</code> |EXAMPLE1=
 
|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> |EXAMPLE2=
 
|mp= Returns the current <u>local</u> ingame time in hours. |Multiplayer Note=
 
| [[date]], [[dateToNumber]], [[BIS_fnc_timeToString]], [[time]], [[skipTime]], [[systemTime]], [[systemTimeUTC]] |SEEALSO=
}}
 
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
 
<!-- Note Section END -->
</dl>
 
<h3 style="display:none">Bottom Section</h3>
 
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.46|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
{{GameCategory|arma1|Scripting Commands}}
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}

Latest revision as of 00:03, 25 June 2022

Redirect to: