playMusic: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (format)
mNo edit summary
Line 52: Line 52:
<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|PLAYMUSICNAME]]
[[Category:Scripting Commands|PLAYMUSICNAME]]
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|PLAYMUSICNAME]]
[[Category:Scripting Commands OFP 1.96|PLAYMUSICNAME]]
[[Category:Scripting Commands OFP 1.46|PLAYMUSICNAME]]
[[Category:Scripting Commands OFP 1.46|PLAYMUSICNAME]]

Revision as of 10:56, 25 September 2014

Hover & click on the images for description

Description

Description:
Plays music defined in CfgMusic. To stop the music execute playMusic "" or give the start time which is beyond the music duration playMusic ["SomeMusic", 1000];
Groups:
Uncategorised

Syntax

Syntax:
playMusic name
Parameters:
name : String - music class
Return Value:
Nothing

Alternative Syntax

Syntax:
playMusic [name, start]
Parameters:
[name, start]: Array
name: String - music class
start: Number - start from (seconds). Could be negative.
Return Value:
Nothing

Examples

Example 1:
playMusic "RadioAmbient1";
Example 2:
playMusic ["RadioAmbient3", 3]; //start from 00:00:03
Example 3:
Play from 00:00:01 to 00:00:050 = [] spawn { playMusic ["RadioAmbient5", 1]; sleep 4; playMusic ""; };

Additional Information

See also:
playSoundsaycreateSoundSourceaddMusicEventHandler

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

Notes

Crowe
You can get all Music Types from Arma:_cfgMusic http://community.bistudio.com/wiki/Arma_2:_Music#top

Bottom Section