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 Sounds To Menu Buttons

Author
Message
Pvt.Dan
1
Years of Service
User Offline
Joined: 24th Jul 2017
Location:
Posted: 26th May 2018 03:01
Hello guys, I have a question, is it possible to add sounds to the main menu's buttons, like when you click on them they will make sounds.

If it's possible, can someone help me with it? It might also help a lot of other people, too.
Medal of Honor
ncmako
6
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 27th May 2018 12:44 Edited at: 27th May 2018 12:45
Pvt.Dan
Quote: " is it possible to add sounds to the main menu's buttons"

Yes, very easy to do. This can ONLY be done in a "BUILT" game ( not a test build )
Grab some menu sounds ( short .wav files ) Place them in an "audiobank" folder of your choosing.
Open the file for the menu you want to edit... Files\languagebank\english\gamebank\*NAME OF YOUR GAME* ( The titlepage.fpi & setuplevel.fpi have menu's )

Add this line of code to where the player clicks on a "button" - "sound=audiobank\misc\ping.wav" <---the name of your sound file might be different of course.

EXAMPLE: In MY "titlepage.fpi the "load new game" button (hud) looks like this, Noticed it's hudtype=2

So near the bottom you will see :state=2,hudselectionmade=2:loadgame Add your sound file path right after one would click the button (hud)

Now when the player clicks on the "Load New Game" the "ping.wav" file will play.
Make a very small test build to study layout and test your sound files. If you get stuck, just ask for help.
best
My games never have bugs. They just develop random features..
Lots and lots of random features...
Pvt.Dan
1
Years of Service
User Offline
Joined: 24th Jul 2017
Location:
Posted: 28th May 2018 06:04
Thanks a lot ncmako! You're our savior!
The sound only works for the Load Game button though, I guess because the others are too fast for the sound to be triggered.
Is it also possible for the Pause Game Menu?
Medal of Honor
ncmako
6
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 28th May 2018 17:09
Pvt.Dan
Quote: "The sound only works for the Load Game button though"

That was just an example for "one" buttons sound. You would have to add this
to every button you would want a sound for. It looks complicated, but it really isn't.
I attached a simple one room test build ( it does nothing except test menu sounds )

Unzip it and test the Main menu & In-game Menu sounds. Every button ( hud ) has a
sound attached, background sound changes when in "menu mode" then goes back
to regular game sound when one exists.
Study the layout and you will see where I added the code for "menu button" sounds.
( the files to look at are in... Files\languagebank\english\gamebank\Backpack_BlackIce the titlepage.fpi & setuplevel.fpi )
Also there is an extra folder under audiobank just for these files (sounds )

best,

My games never have bugs. They just develop random features..
Lots and lots of random features...

Attachments

Login to view attachments
Pvt.Dan
1
Years of Service
User Offline
Joined: 24th Jul 2017
Location:
Posted: 29th May 2018 03:48
Thanks! It works now!
Medal of Honor
KingMassen
1
Years of Service
User Offline
Joined: 23rd Dec 2016
Location:
Posted: 29th May 2018 10:52
@ncmako
Can you make a hover effect without using GUI-X9? Like changing the image of the HUD (I have been away for a long time lol)
ncmako
6
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 30th May 2018 00:57
@ KingMassen Unfortunately without using the GUIx9 commands there is no "mouse hover over" ability
Maybe in the near future ?
My games never have bugs. They just develop random features..
Lots and lots of random features...

Login to post a reply

Server time is: 2018-08-15 02:35:11
Your offset time is: 2018-08-15 02:35:11