Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Models and Media / Using real music in FPS Creator

Author
Message
Turtle Machine
13
Years of Service
User Offline
Joined: 18th Feb 2012
Location:
Posted: 3rd Mar 2012 00:28
In my game I'd like to use real songs for the game music or have it activated during the level but when I set the song to trigger it does not play, how can I fix this?
gozzy1999
13
Years of Service
User Offline
Joined: 11th Jun 2011
Location: in the closet
Posted: 3rd Mar 2012 09:34
set the music format to .OGG normally it isn't

''Make sure your hands are clean before you point the finger''
xplosys
19
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 3rd Mar 2012 16:56
Quote: "Using real music in FPS Creator"


As opposed to what? Fake music?
As mentioned above, use .ogg or .wav music files. I don't think mp3's will work, at least they didn't before.

Brian.

!retupmoc eht ni deppart m'I !pleH

BlackFox
FPSC Master
17
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 3rd Mar 2012 17:04 Edited at: 3rd Mar 2012 22:14
Quote: "As opposed to what? Fake music?"


Back and fully charged I see?

Quote: "As mentioned above, use .ogg or .wav music files. I don't think mp3's will work, at least they didn't before."


Correct, mp3 does not work.

Quote: "In my game I'd like to use real songs for the game music or have it activated during the level but when I set the song to trigger it does not play"


Playing sound with a Sound Zone:

Place your sound zone, then right-click and find the file you want. Make sure it is in the "files\audiobank\" folder at least (it can be in a sub folder within audiobank). For the main script, you can select "soundinzone.fpi", or "soundloopinzone.fpi" (if you want it to loop).

Playing sound within a script

Another method is to have a script without the use of sound zones. For example:



You will notice the line ":state=0:music=audiobank\NorthernFox\WW2\GU\l_briefing_1.wav,musicvolume=50,soundscale=25". That line plays the sound in that particular level. It is only a few seconds, but plays over and over.

Another example from level two of a development we did:



Again, note the line ":state=4:music=audiobank\NorthernFox\WW2\GU\Action.ogg,musicvolume=50,soundscale=25,state=5" which plays that particular piece. It is about two and a half minutes long. When the player hits a particular spot on the map (around the two and a half minute mark), there is another script I have to stop the music and then play another piece, like this:



From the above snippet, notice how you "stop" the music with the "music=0" command, then the next state calls the "music" command again. Quite effective to play music throughout your levels.

Not only can you play sound from sound zones or triggers, but you can have scripts that also play the sounds, using "plrsound" or "music" commands.

Quote: "I'd like to use real songs for the game music"


In that case, go with .ogg since .wav will/could be rather large.


Twitter: @NFoxMedia
gozzy1999
13
Years of Service
User Offline
Joined: 11th Jun 2011
Location: in the closet
Posted: 3rd Mar 2012 20:36

this is roughly how to add a sound file to a script,
you can use this script as a template but it doesn't work for reasons unknown

''Make sure your hands are clean before you point the finger''

Login to post a reply

Server time is: 2025-05-15 06:29:03
Your offset time is: 2025-05-15 06:29:03