BIS fnc jukebox: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game version" to "|Game version=")
m (Text replacement - "{{Feature|Informative|" to "{{Feature|informative|")
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 1.08


|1.08|Game version=
|gr1= Sound
____________________________________________________________________________________________


| Plays music, depending on the player group status.
|descr= Plays music, depending on the player group status.
{{Informative|If no music classes are given, the function will get them from config automatically.}} |DESCRIPTION=
{{Feature|informative|If no music classes are given, the function will get them from config automatically.}}
____________________________________________________________________________________________


| [function, parameters] call [[BIS_fnc_jukebox]] |SYNTAX=
|s1= [function, parameters] call [[BIS_fnc_jukebox]]


|p1= function: [[String]] - (Optional, default "initialize") can be one of:
|p1= function: [[String]] - (Optional, default "initialize") can be one of:
{{Columns|4|
* "initialize"
* "initialize"
* "terminate"
* "terminate"
Line 30: Line 29:
* "isSafe"
* "isSafe"
* "onEachFrame"
* "onEachFrame"
 |PARAMETER1=
}}


|p2= parameters: [[Array]] - (Optional)
|p2= parameters: [[Array]] - (Optional)


* '''"initialize"''': [stealthMusics, combatMusics, safeMusics, volume, transition, radius, executionRate, noRepeat]
* '''"initialize"''': [stealthMusics, combatMusics, safeMusics, volume, transition, radius, executionRate, noRepeat]
** stealthMusics: [[Array]] of [[String|Strings]]
** stealthMusics: [[Array]] of [[String]]s
** combatMusics: [[Array]] of [[String|Strings]]
** combatMusics: [[Array]] of [[String]]s
** safeMusics: [[Array]] of [[String|Strings]]
** safeMusics: [[Array]] of [[String]]s
** volume: [[Number]]
** volume: [[Number]]
* '''"terminate"''': none
* '''"terminate"''': none
Line 46: Line 45:
* '''"status"''': none
* '''"status"''': none
* '''"randomMusic"''': [container]
* '''"randomMusic"''': [container]
** container: [[Array]] of [[String|Strings]] - music list to choose from
** container: [[Array]] of [[String]]s - music list to choose from
* '''"selectMusic"''': none
* '''"selectMusic"''': none
* '''"playMusic"''': [musicName]
* '''"playMusic"''': [musicName]
Line 56: Line 55:
* '''"isCombat"''': none
* '''"isCombat"''': none
* '''"isSafe"''': none
* '''"isSafe"''': none
* '''"onEachFrame"''': none |PARAMETER2=
* '''"onEachFrame"''': none


|
|r1=
* [[Array]] for:
* [[Array]] for:
** "readContainerFromConfig"
** "readContainerFromConfig"
Line 81: Line 80:
** "forceBehaviour"
** "forceBehaviour"
** "playMusic"
** "playMusic"
** "onEachFrame" |RETURNVALUE=
** "onEachFrame"
____________________________________________________________________________________________


|x1= <code>[] [[call]] [[BIS_fnc_jukebox]];</code> |EXAMPLE1=
|x1= <sqf>[] call BIS_fnc_jukebox;</sqf>
____________________________________________________________________________________________


| [[playMusic]], [[BIS_fnc_music]] |SEEALSO=
|seealso= [[playMusic]] [[BIS_fnc_music]]
}}
}}
<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:Function Group: Misc|{{uc:jukebox}}]]
[[Category:Functions|{{uc:jukebox}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:jukebox}}]]

Latest revision as of 01:24, 2 February 2024

Hover & click on the images for description

Description

Description:
Plays music, depending on the player group status.
If no music classes are given, the function will get them from config automatically.
Execution:
call
Groups:
Sound

Syntax

Syntax:
[function, parameters] call BIS_fnc_jukebox
Parameters:
function: String - (Optional, default "initialize") can be one of:
  • "initialize"
  • "terminate"
  • "readContainerFromConfig"
  • "isInitialized"
  • "forceBehaviour"
  • "status"
  • "randomMusic"
  • "selectMusic"
  • "playMusic"
  • "nearEnemies"
  • "hasContact"
  • "isContact"
  • "isStealth"
  • "isCombat"
  • "isSafe"
  • "onEachFrame"
parameters: Array - (Optional)
  • "initialize": [stealthMusics, combatMusics, safeMusics, volume, transition, radius, executionRate, noRepeat]
  • "terminate": none
  • "readContainerFromConfig": [wantedTheme]
  • "isInitialized": none
  • "forceBehaviour": [behaviour]
    • behaviour: String - can be "stealth", "combat" or "safe". Any other value will reset the forced behaviour.
  • "status": none
  • "randomMusic": [container]
  • "selectMusic": none
  • "playMusic": [musicName]
  • "nearEnemies": none
  • "hasContact": none
  • "isContact": none
  • "isStealth": none
  • "isCombat": none
  • "isSafe": none
  • "onEachFrame": none
Return Value:
  • Array for:
    • "readContainerFromConfig"
    • "nearEnemies" - a list of enemies nearby
  • Boolean for:
    • "isInitialized"
    • "hasContact"
    • "isContact"
    • "isStealth"
    • "isCombat"
    • "isSafe"
  • String for:
    • "status" - can be "stealth", "combat", "safe" or "error"
    • "randomMusic" - one of the available musics
    • "selectMusic"
  • Nothing for:
    • "initialize"
    • "terminate"
    • "forceBehaviour"
    • "playMusic"
    • "onEachFrame"

Examples

Example 1:
[] call BIS_fnc_jukebox;

Additional Information

See also:
playMusic BIS_fnc_music

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