Description
Plays music, depending on the player group status.
Note
If no music classes are given, the function will get them from config automatically.
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]
- musicName: String
- "nearEnemies": none
- "hasContact": none
- "isContact": none
- "isStealth": none
- "isCombat": none
- "isSafe": none
- "onEachFrame": none
Returns: - 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;