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 Product Chat / Adding Music to the game. and changing it in different zones

Author
Message
WilliamK
14
Years of Service
User Offline
Joined: 15th Feb 2012
Location: Brazil
Posted: 20th Feb 2012 14:22
Here's the thing, I read the manual, but its still not clear how to handle different in-game music zones.

Here's what I want:

1) Main song that starts once the game Level begins (after it plays my game-start video)

2) When entering a room that was locked (after you complete puzzle #1) it changes the game music to another one. (best if it fades the previous music volume first)

When I tried the script musicchangeinzone.fpi it works, BUT, the music volume and stereo-field changes as the player moves, why? Or should I do this in a different manner?

Thanks for any advice.

www.William-K.com
www.Wusik.com
WilliamK
14
Years of Service
User Offline
Joined: 15th Feb 2012
Location: Brazil
Posted: 20th Feb 2012 14:24
Ah, I haven't searched it yet, but can my game start with a video first, then go to the game? I could put a story marker right where the player is, it works, but is this a good usage of the story marker? Just checking.

Thank you again!

Best Regards, WilliamK

www.William-K.com
www.Wusik.com
maho76
15
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 20th Feb 2012 15:42
mediazones often cause problems when placed directly over playerstart, so could be that you have to workaround that with a triggerzone that activates the music/video/whatever... wich also doesnt work for me in v119 (have to test).

Quote: "3.16.2.3 MUSICOVERRIDE=FilePath
Description: This replaces the current background sound/music with a new file
and plays the new file continuously.
Range: FilePath = *.ogg and *.wav files only.
Example: :state=1:musicoverride=audiobank\music\generic\main.wav"

this is how to change backgroundmusic (normally stupid ambient-humm) wich remains in characteristics (so no player-oriented changes in stereofield a.s.o).
same for "plrsound=" instead of "sound=", also is a static sound in players head. problem with sound/plrsound is that you cannot edit/stop them once played, there are no commands for. stopsound only works for loopsound=-commands, so you should use musicoverride for that.

WilliamK
14
Years of Service
User Offline
Joined: 15th Feb 2012
Location: Brazil
Posted: 20th Feb 2012 16:44
Ok, rebooted the machine, tested with an empty game. A small 400k Ogg file plays, but not a 4 Meg one. So I made it smaller, 3.4 Meg, and it works, go figure...

What I did is add a Trigger-Marker outside the map and this code:

:state=0:musicoverride=$0,state=1

It works. The game starts right away with the right music. And this time it does play unaffected by the player position. Not sure why it didn't work before, but a clean reboot may have solved the "problem".

Thanks again! :-]

Sorry for been such a noob... but my first level is nearly done, and I want to test scripts and such now, and music is the most important part. (visit www.William-K.com and you will see why)

www.William-K.com
www.Wusik.com
WilliamK
14
Years of Service
User Offline
Joined: 15th Feb 2012
Location: Brazil
Posted: 20th Feb 2012 16:49
And here's a script to play a video right at the start, then after the video the game-music and the game starts.



Could you guys tell me if this is good or not?

www.William-K.com
www.Wusik.com
WilliamK
14
Years of Service
User Offline
Joined: 15th Feb 2012
Location: Brazil
Posted: 20th Feb 2012 17:01
Ah, scratch the file size problem, somehow SoundForge messed something out. (still using an older version 8 something, can't afford to get the latest right now)

www.William-K.com
www.Wusik.com
WilliamK
14
Years of Service
User Offline
Joined: 15th Feb 2012
Location: Brazil
Posted: 20th Feb 2012 17:12
Drats, there is something wrong with Ogg files, either SoundForge is doing something wrong, or there is some sort of "minutes" limitations on the song.

I was testing Song #2 now, in a different room, and it failed. File size was small. But I decided to reduce the size of the song from 6 minutes to 3 minutes, and it works now.

So, my question is, are there any limitations on the musics? Just checking.

Thanks again!

www.William-K.com
www.Wusik.com

Login to post a reply

Server time is: 2026-07-01 22:13:09
Your offset time is: 2026-07-01 22:13:09