Trigger cdaudio: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		

 Note:The MP3 files loaded, and what number they are used as in this entity are hard-coded into the game, except in
Note:The MP3 files loaded, and what number they are used as in this entity are hard-coded into the game, except in  . Therefore, the filenames of custom MP3s must be very specific.
. Therefore, the filenames of custom MP3s must be very specific.
 Note:In early retail (WON) versions of the game, only CD Audio support was support. Later WON versions added undocumented MP3 playback which was used in the Steam release.
Note:In early retail (WON) versions of the game, only CD Audio support was support. Later WON versions added undocumented MP3 playback which was used in the Steam release.
 Note:Track 29 or gamestartup.mp3 will automatically play upon game launching into the main menu, and will loop and continue to play until another music track is called or a mulitplayer server is loaded.
Note:Track 29 or gamestartup.mp3 will automatically play upon game launching into the main menu, and will loop and continue to play until another music track is called or a mulitplayer server is loaded.
		
	
| No edit summary | SirYodaJedi (talk | contribs)  | ||
| (5 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
| {{ | {{tabs|trigger cdaudio|goldsrc = 1|source = 1|main = goldsrc}} | ||
| {{distinguish|target_cdaudio|desc1=the point entity}} | {{distinguish|target_cdaudio|desc1=the point entity}} | ||
| {{ | {{this is a|brush entity|engine=GoldSrc|name=trigger_cdaudio|sprite=ambient generic.png}} | ||
| It plays a specified track either on the CD or in the media folder when the player walks through this entity. | It plays a specified track either on the CD or in the media folder when the player walks through this entity. | ||
| {{clr}}{{Note|The [[MP3]] files loaded, and what number they are used as in this entity are hard-coded into the game, except in {{czds}}. Therefore, the filenames of custom MP3s must be very specific.}} | {{clr}}{{Note|The [[MP3]] files loaded, and what number they are used as in this entity are hard-coded into the game, except in {{czds}}. Therefore, the filenames of custom MP3s must be very specific.}} | ||
| Line 7: | Line 7: | ||
| == Keyvalues == | == Keyvalues == | ||
| {{KV| | {{KV|MP3 file|intn=trackname|string|only={{czds}}|The path of the [[MP3]] track to play, relative to the base mod directory.}} | ||
| {{KV|Loop| | {{KV|Loop|intn=loop|boolean|only={{czds}}|Whether the track should loop. | ||
| :{{modernConfirm|Broken in current Steam release?}} | :{{modernConfirm|Broken in current Steam release?}} | ||
| }} | }} | ||
| {{KV|Track|integer| | {{KV|Track|intn=health|integer choices|[[List of Half-Life 1 music|Track number]] to play. Either is associated with the name of an [[MP3]] file to play via the media folder (only in {{pcgw|Half-Life#No_music_playback_in_the_retail_version|later WON version as undocumented}}, fully supported in all Steam versions) OR the CD-track number if a Red Book Audio CD is available (Windows only).}} | ||
| :{| class=standard-table | :{| class=standard-table | ||
| ! Value || Mp3 file to play | ! Value || Mp3 file to play | ||
| Line 88: | Line 86: | ||
| [[Category:Half-Life Entities]] | [[Category:Half-Life Entities]] | ||
| [[Category:Level Design]] | [[Category:Level Design]] | ||
| [[Category:GoldSrc Sound System]] | |||
Latest revision as of 11:56, 15 March 2025
Not to be confused with target_cdaudio (the point entity).

trigger_cdaudio  is a   brush entity  available in all  GoldSrc games.
 GoldSrc games.
It plays a specified track either on the CD or in the media folder when the player walks through this entity.
 Note:The MP3 files loaded, and what number they are used as in this entity are hard-coded into the game, except in
Note:The MP3 files loaded, and what number they are used as in this entity are hard-coded into the game, except in  . Therefore, the filenames of custom MP3s must be very specific.
. Therefore, the filenames of custom MP3s must be very specific. Note:In early retail (WON) versions of the game, only CD Audio support was support. Later WON versions added undocumented MP3 playback which was used in the Steam release.
Note:In early retail (WON) versions of the game, only CD Audio support was support. Later WON versions added undocumented MP3 playback which was used in the Steam release.Keyvalues
- MP3 file (trackname)  <string> (only in  ) )
- The path of the MP3 track to play, relative to the base mod directory.
- Loop (loop)  <boolean> (only in  ) )
- Whether the track should loop.
 Confirm:Broken in current Steam release? Confirm:Broken in current Steam release?
- Track (health) <integer choices>
- Track number to play. Either is associated with the name of an MP3 file to play via the media folder (only in  later WON version as undocumented, fully supported in all Steam versions) OR the CD-track number if a Red Book Audio CD is available (Windows only). later WON version as undocumented, fully supported in all Steam versions) OR the CD-track number if a Red Book Audio CD is available (Windows only).
- Value - Mp3 file to play - 1 - <None> - 2 - Half-Life01.mp3 - 3 - Prospero01.mp3 - 4 - Half-Life12.mp3 - 5 - Half-Life07.mp3 - 6 - Half-Life10.mp3 - 7 - Suspense01.mp3 - 8 - Suspense03.mp3 - 9 - Half-Life09.mp3 - 10 - Half-Life02.mp3 - 11 - Half-Life13.mp3 - 12 - Half-Life04.mp3 - 13 - Half-Life15.mp3 - 14 - Half-Life14.mp3 - 15 - Half-Life16.mp3 - 16 - Suspense02.mp3 - 17 - Half-Life03.mp3 - 18 - Half-Life08.mp3 - 19 - Prospero02.mp3 - 20 - Half-Life05.mp3 - 21 - Prospero04.mp3 - 22 - Half-Life11.mp3 - 23 - Half-Life06.mp3 - 24 - Prospero03.mp3 - 25 - Half-Life17.mp3 - 26 - Prospero05.mp3 - 27 - Suspense05.mp3 - 28 - Suspense07.mp3 - 29 - gamestartup.mp3 - 30 - <None> 
 Note:Track 29 or gamestartup.mp3 will automatically play upon game launching into the main menu, and will loop and continue to play until another music track is called or a mulitplayer server is loaded.
Note:Track 29 or gamestartup.mp3 will automatically play upon game launching into the main menu, and will loop and continue to play until another music track is called or a mulitplayer server is loaded.- Name (targetname) <string>
- The targetname that other entities refer to this entity by.
See also
- target_cdaudio, a point entity used for the same purpose
- Soundtrack lists
