BIS fnc jukebox: Difference between revisions
Jump to navigation
Jump to search
m (GVI 1.00 --> 1.08 http://dev.arma3.com/post/spotrep-00016) |
Lou Montana (talk | contribs) m (Text replacement - "{{Feature|Informative|" to "{{Feature|informative|") |
||
(25 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=function | |||
|game1= arma3 | |||
|version1= 1.08 | |||
| | |gr1= Sound | ||
| | |descr= Plays music, depending on the player group status. | ||
{{Feature|informative|If no music classes are given, the function will get them from config automatically.}} | |||
| | |s1= [function, parameters] call [[BIS_fnc_jukebox]] | ||
|p1= function: [[String]] - (Optional, default "initialize") can be one of: | |||
{{Columns|4| | |||
* "initialize" | |||
* "terminate" | |||
* "readContainerFromConfig" | |||
* "isInitialized" | |||
* "forceBehaviour" | |||
* "status" | |||
* "randomMusic" | |||
* "selectMusic" | |||
* "playMusic" | |||
* "nearEnemies" | |||
* "hasContact" | |||
* "isContact" | |||
* "isStealth" | |||
* "isCombat" | |||
* "isSafe" | |||
* "onEachFrame" | |||
}} | |||
|p2= parameters: [[Array]] - (Optional) | |||
* '''"initialize"''': [stealthMusics, combatMusics, safeMusics, volume, transition, radius, executionRate, noRepeat] | |||
** stealthMusics: [[Array]] of [[String]]s | |||
** combatMusics: [[Array]] of [[String]]s | |||
** safeMusics: [[Array]] of [[String]]s | |||
** volume: [[Number]] | |||
* '''"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] | |||
** container: [[Array]] of [[String]]s - music list to choose from | |||
* '''"selectMusic"''': none | |||
* '''"playMusic"''': [musicName] | |||
** musicName: [[String]] | |||
* '''"nearEnemies"''': none | |||
* '''"hasContact"''': none | |||
* '''"isContact"''': none | |||
* '''"isStealth"''': none | |||
* '''"isCombat"''': none | |||
* '''"isSafe"''': none | |||
* '''"onEachFrame"''': none | |||
|r1= | |||
* [[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" | |||
|x1= < | |x1= <sqf>[] call BIS_fnc_jukebox;</sqf> | ||
|seealso= [[playMusic]] [[BIS_fnc_music]] | |||
}} | }} | ||
Latest revision as of 00:24, 2 February 2024
Description
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]
- musicName: String
- "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"
- Array for:
Examples
- Example 1:
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