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 Scripts / Change music with pressing a key

Author
Message
Payam
16
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 15th Sep 2010 13:09
Hi everyone,

I wanna know is there any function for changing the music with pressing a key?

If FPSC support it I want to know how can I do that,and if anyone script it I will say many thanks,also the way to do this is good.

Have our guns was a mistake!!!

I am PaYaM
xplosys
19
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 15th Sep 2010 17:37 Edited at: 15th Sep 2010 17:43
Well, the command to change music would be...

MUSICOVERRIDE=X replaces in-game music in real time where x=music file

and the command to check for the kepress would be...

SCANCODEKEYPRESSED=X is true when X=the key code of a pressed key

but in order to put it together into a working script to suit your needs, we would really need more information on how you want it to work. Will it just change the music randomly when a key is pressed, or will it be more like an interactive jukebox somewhere in the game?

... and the band played on.
Seth Black
FPSC Reloaded TGC Backer
20
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 15th Sep 2010 18:52 Edited at: 22nd Sep 2010 19:13
EDIT: Redacted by Seth Black

Just forget it...

Payam
16
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 15th Sep 2010 19:13
Okay I'll explain more:

I want to create a game but not an action one.

Before making models I have to know if can I script for it.

There will be an Ipod in game which plays some musics by pressing keys from 2 to 9,it will start a new music with repeat on.
The game will be different .

(Next step is disabling the "0" there should not to holster)

Have our guns was a mistake!!!

I am PaYaM
AVPR
14
Years of Service
User Offline
Joined: 20th Jul 2010
Location:
Posted: 29th Oct 2010 07:56
Here's a script that you can use (i don't require any credit for this) you may want to add or subtract the amount of songs listed in the script.



INSTRUCTIONS:

1. Put three songs named "song1.wav" "song2.wav" and "song3.wav" in the audiobank folder (make sure all songs are .wav files)

2. Open up FPS Creator and create a level with a switch on the wall.

3. Right click on the switch and make the main script the one i am giving you now

4. Test your game and walk up to the switch and press the key's "7" "8" and "9" (not on the numpad) it should play the songs. Please let me know if it doesn't.

Login to post a reply

Server time is: 2025-06-04 10:31:19
Your offset time is: 2025-06-04 10:31:19