getMusicPlayedTime: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
m (Some wiki formatting)
 
(25 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 1.78


|1.78|= Game version
|gr1= Sounds
____________________________________________________________________________________________


| Returns elapsed time in seconds for currently playing music track. |DESCRIPTION=
|descr= Returns elapsed time in seconds for currently playing music track.
____________________________________________________________________________________________


| [[getMusicPlayedTime]] |SYNTAX=
|s1= [[getMusicPlayedTime]]


| [[Number]] |RETURNVALUE=
|r1= [[Number]]


____________________________________________________________________________________________
|x1= <sqf>
 
playMusic ["LeadTrack06_F_Tank", 0];
|x1 = <code>[[playMusic]] ["LeadTrack06_F_Tank", 0];  
onEachFrame {hintSilent str getMusicPlayedTime};
[[onEachFrame]] {[[hintSilent]] [[str]] [[getMusicPlayedTime]]};</code> |EXAMPLE1=
</sqf>
 
 
| [[addMusicEventHandler]], [[playMusic]] |SEEALSO=


|seealso= [[addMusicEventHandler]] [[playMusic]]
}}
}}
<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:Command_Group:_GUI_Control|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]

Latest revision as of 11:20, 4 May 2022

Hover & click on the images for description

Description

Description:
Returns elapsed time in seconds for currently playing music track.
Groups:
Sounds

Syntax

Syntax:
getMusicPlayedTime
Return Value:
Number

Examples

Example 1:
playMusic ["LeadTrack06_F_Tank", 0]; onEachFrame {hintSilent str getMusicPlayedTime};

Additional Information

See also:
addMusicEventHandler playMusic

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note