Frictional Games Forum (read-only)

Full Version: Background music?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Anyone know how to put in background music into a level of a custom story once you spawn? I'm new at this so don't just give me the line of code tell me where I'm supposed to put it and stuff lol Tongue
PlayMusic.
(04-06-2012, 02:19 AM)Strembitsky Wrote: [ -> ]PlayMusic.
How do i make it specify which file?
(04-06-2012, 02:29 AM)kiruclanz Wrote: [ -> ]How do i make it specify which file?

http://wiki.frictionalgames.com/hpl2/amn...unds_music
My best help:


PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);

asMusicFile - the music to play + extension .ogg (MUST BE IN QUOTES)


abLoop - determines whether a music track should loop (True - Yes, False - No)


afVolume - volume of the music (No idea, I usually set mine to 100)


afFadeTime - time in seconds until music reaches full volume (Lower number, faster fade in)


alPrio - priority of the music. only the music with the highest priority can be heard! 0 - highest, 1 - lower, etc



(04-06-2012, 02:16 AM)kiruclanz Wrote: [ -> ]Anyone know how to put in background music into a level of a custom story once you spawn? I'm new at this so don't just give me the line of code tell me where I'm supposed to put it and stuff lol Tongue
PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);