playMusic: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
 
(merged syntax variations)
Line 1: Line 1:
'''playMusic''' can refer to these scripting commands:
{{Command|= Comments
*[[playMusic name]] - format is <code>playmusic name</code>
____________________________________________________________________________________________
*[[playMusic nameAndpos]] - format is <code>playmusic [name,position]</code>


{{Disambig}}
| ofp |= Game name
 
|1.00|= Game version
____________________________________________________________________________________________
 
| Plays music defined in [[Description.ext#Music|CfgMusic]].  |= Description
____________________________________________________________________________________________
 
| '''playMusic''' name |= Syntax
| p1 = name : [[String]]
|[[Nothing]]  |= Return value
____________________________________________________________________________________________
|s2= '''playMusic''' [name,position] |= Syntax 2
 
|p21= [name,position]: [[Array]] |= Parameter 1
|p22 = name: [[String]] |= Parameter 2
|p23= position: [[Number]] in seconds |= Parameter 3
 
|r2= [[Nothing]] |= Return value 2
 
____________________________________________________________________________________________
|x1 = <code>'''playMusic''' "musicname"</code> |= Example 1 
|x2 = <code>playMusic ["Track13", 30]</code> |= Example 2
 
| [[playSound]], [[say]], [[say string]], [[createSoundSource]] |= See also
 
}}
 
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
 
<dd class="notedate"></dd>
<dt class="note">'''[[User:Crowe|Crowe]]'''</dt>
<dd class="note">
You can get all Music Types from [[Arma:_cfgMusic]]</dd>
 
 
 
<!-- Note Section END -->
</dl>
 
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|PLAYMUSICNAME]]
[[Category:Scripting Commands OFP 1.96|PLAYMUSICNAME]]
[[Category:Scripting Commands OFP 1.46|PLAYMUSICNAME]]
[[Category:Scripting Commands ArmA|PLAYMUSICNAME]]
[[Category:Scripting Commands ArmA2|PLAYMUSICNAME]]
[[Category:Command_Group:_Sounds|{{uc:{{PAGENAME}}}}]]

Revision as of 18:00, 3 June 2009

Hover & click on the images for description

Description

Description:
Plays music defined in CfgMusic.
Groups:
Uncategorised

Syntax

Syntax:
playMusic name
Parameters:
name : String
Return Value:
Nothing

Alternative Syntax

Syntax:
playMusic [name,position]
Parameters:
[name,position]: Array
name: String
position: Number in seconds
Return Value:
Nothing

Examples

Example 1:
playMusic "musicname"
Example 2:
playMusic ["Track13", 30]

Additional Information

See also:
playSoundsaysay stringcreateSoundSource

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

Bottom Section