Heist Music
Updated for version 4.4.
This modules creates a heist track.
The name of the module you use as the meta of the module definition is 'HeistMusic' or 'HeistMusicModule' if
_force_search
is set to true in the module definition.<HeistMusic id directory>
<event name source/>
</HeistMusic>
Parameter | Type | Description |
---|---|---|
id | String | The ID of the track. This has to be unique |
volume | Float | The volume of the music (from 0 to 1) |
Parameter | Type | Description |
---|---|---|
name | String | The name of the event. At the moment it can only be setup for stealth, anticipation for build up, assault and control |
source | String | The path to the .ogg file that the track should play in the event |
start_source | String | Optional path to sound to play before playing source |
volume | Float | Volume of this specific music event |
allow_switch | Bool | Wether a random track is selected each loop or only once per event if multiple tracks are available (See <track> node) |
weight | Integer | Base weight of any tracks added via <track> nodes (See <track> node) |
alt_source (deprecated) | String | Use <track> nodes instead |
alt_chance (deprecated) | Float | Use <track> nodes instead |
alt_start_source (deprecated) | String | Use <track> nodes instead |
<track source>
<track>
nodes can be placed as children of <event>
nodes to specify multiple tracks for a single event.
They inherit any values set on the <event>
node if not specified in the <track>
node itself.Parameter | Type | Description |
---|---|---|
source | String | The path to the .ogg file that the track should play in the event |
start_source | String | Optional path to sound to play before playing source |
volume | Float | Volume of this specific music track |
weight | Integer | Weight of this track for being chosen randomly |
<HeistMusic id="my_heist_music_name" directory="sounds">
<event name="setup" source="stealth.ogg"/>
<event name="anticipation" source="buildup.ogg"/>
<event name="assault" source="assault.ogg"/>
<event name="control" source="control.ogg"/>
</HeistMusic>
This will add the track. You will still need to localize the name of the track. In this case menu_jukebox_my_heist_music_name and menu_jukebox_screen_my_heist_music_name will need to be localized.
Having multiple tracks for a single event will allow you to create a random track selection, similar to how "Ode to Greed" or "Break the Rules" have a chance to play a lyric version of their assault tracks.
For this you would simply set up an event like this
<event name="assault">
<track source="assault.ogg" weight="10"/>
<track source="assault_lyrics.ogg" weight="1"/>
</event>
The weight defines how likely a track is going to be selected whenever this event plays. In the example above this would mean the regular assault track is 10 times more likely to play than the lyric version.
Function | Return Type | Description |
---|---|---|
MakeBuffer(String source) | XAudioBuffer | Called by RegisterHook to create an XAudio buffer |
Last modified 10mo ago