Ambient sound effect

From SRB2 Wiki
Jump to navigation Jump to search
This article or section is outdated and has not been fully updated to reflect the current version of SRB2.

Please help the Wiki by correcting or removing any misinformation, as well as adding any new information to the page.

In SRB2, ambient sound effects are special sound effects used as background noises in levels, which are continuously played back by special "source" Objects. There are ten different ambient sound effects in SRB2, all of which have intangible, invisible source Objects which do nothing else besides playing the sound:

The Alarm scenery Object can also be considered a source for an "ambient" sound effect itself, but it does not have the MF_AMBIENT flag and the sound is played through the action A_Scream rather than through the source code; for these reasons, it is not commonly grouped with the above.

Custom ambient sound effects

It is possible to make custom ambient sound effects for SRB2 with the use of SOCs and/or Lua. To make an Object behave as the source for an ambient sound effect, it needs to be given the MF_AMBIENT flag. MF_NOBLOCKMAP, MF_NOSECTOR and MF_NOGRAVITY may also be given to make the source Object intangible, invisible and be unaffected by gravity. The SpawnState for such an Object should also be set to S_INVISIBLE.

The following Object properties control the source Object's behavior:

  • SeeSound: Determines the sound ID of the ambient sound effect played by the source Object.
  • SpawnHealth: Determines the interval (in tics) between each playing of the ambient sound effect.
  Object types [view]
General EnemyBossPushableSpringMonitorNiGHTS power-upProjectileAmbient sound effect
Special PlayerShieldsFlickiesOverlay
Related links List of Object types