Add - MusicType

From the CreationKit Wiki
Jump to navigation Jump to search

Member of: MusicType Script

Adds this music type to the music stack, causing it to start playing if it's the highest priority item. If the music type is flagged as "Plays One Selection", it will automatically be removed when it finishes, and a call to Remove() will not be required. Otherwise it will play until removed, or until something else is added to the music stack.

Caution that a known bug with this function is the MusicType can get baked into current saved games. Upon reloading a save, even if Remove() was invoked previously, your MusicType will still play regardless if it has higher priority. This can be mitigated by setting conditions on individual music tracks, as well as creating a cleanup script which fires OnPlayerLoadGame() to remove any possible traces that may still be present. This bug still persists in SSE.

Syntax[edit | edit source]

Function Add() native

Parameters[edit | edit source]


Return Value[edit | edit source]


Examples[edit | edit source]

; Start the epic music

See Also[edit | edit source]