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 / New Script - Radio

Author
Message
Little Bill
16
Years of Service
User Offline
Joined: 18th Jun 2008
Location: UK
Posted: 18th Jul 2008 20:30
Howdy guys.

Here is a script that plays a song and when you go up to the entity and use it it it goes to the next, the songs keep looping until you change it.

So far it plays throughout the whole level, I'm trying to get it so that the sound feels like it's coming from the entity. Any help on this would be wonderful.

Script:



Hope you guys like it and find it useful. Please leave some feedback!

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 18th Jul 2008 20:34
Looks good, I'd use SOUNDSCALE=X to tone down the sound range, it's a little gem that Ply found in the source.....

Little Bill
16
Years of Service
User Offline
Joined: 18th Jun 2008
Location: UK
Posted: 18th Jul 2008 20:41
I don't seem to get it to work. I added it in after the LOOPSOUND action and it seems to have no effect. Is X equal to segments or 100=1 segment?

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 18th Jul 2008 20:43
I'm unsure, but I think 100 is all over the map, and 0 is muted......

Little Bill
16
Years of Service
User Offline
Joined: 18th Jun 2008
Location: UK
Posted: 18th Jul 2008 20:51
Nope. Doesn't work.

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 18th Jul 2008 20:55
I dunno then, I don't think LOOPSOUND uses 3D sound......

Little Bill
16
Years of Service
User Offline
Joined: 18th Jun 2008
Location: UK
Posted: 18th Jul 2008 21:06
Darn. Looks like it will have to stay like that

Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 18th Jul 2008 21:09
..still a really nice contribution, Little Bill.

Many thanks for the generosity...


xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 18th Jul 2008 21:17
Yes, it could play an important role in getting clues and such.

Best.

Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 18th Jul 2008 21:34
..darn tootin'.


Little Bill
16
Years of Service
User Offline
Joined: 18th Jun 2008
Location: UK
Posted: 18th Jul 2008 21:39
Thanks guys. If you modify it (other than to replace the songs) I'd love to see it!

Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 18th Jul 2008 22:03
...I don't have FPSC installed on this computer, and I have a major move coming up, but when I'm situated, I'll see if I can come up with something that's a fun alternative to playing music...


Roger Wilco
19
Years of Service
User Offline
Joined: 6th Jul 2005
Location: In the Shadow of Chernobyl
Posted: 18th Jul 2008 22:54
That's a neat little script. I might try it out just for the heck of it.

Hm, so that's what soundscale does. I thought it was only for increasing/decreasing the volume. I didn't get it to work when I tried it anyhow, though.

Maybe Ply can shed some light on the situation. Or any other scripting guru that might be lurking around.

Check out the Gunn3r Games web-site and its growing community, and expand the joy of indie development!
http://www.gunn3rgames.net/
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 18th Jul 2008 23:34
maybe he included it in his mod because it didn't work in the original version...

I know not what WWIII will be fought but I do know that WWIV will be fought with sticks and stones-Albert Einstein
Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 19th Jul 2008 00:21
If you use music=x, and then use the page up and page down keys, you cancontrol the volume of it also by using musicvolume=x.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 19th Jul 2008 01:46
SOUNDSCALE=X

Adjusts the scale of volume heard from ALL 3D sounds in FPSC.

The default value for X is 100, as in 100%.

Ex.
Setting soundscale to 50 will cause the volume from all 3d sounds to be half as loud as normal.


This is an official command in FPSC, not one from a Mod.

Keep in mind this effects ALL sounds in FPSC. Even "plrsound" sounds are still treated as 3D sounds because of the way they are created and used in the source. The only difference between "plrsound" and "sound" is that "plrsound" will position the sound directly on top of the player instead of at the entity's location, creating the illusion that it can be heard from anywhere.


I hope this clears some things up.



Great script, btw. Good to have another contributory scripter on board.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Little Bill
16
Years of Service
User Offline
Joined: 18th Jun 2008
Location: UK
Posted: 19th Jul 2008 08:56
Ok. Thanks for the explanation. Would I be better off using MUSIC and MUSICOVERRIDE instead of LOOPSOUND? I'm guessing the music commands will override the music set in the setuplevel.fpi. Is that true?

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 20th Jul 2008 01:20
No problem!

Yes, you can only have one MUSIC playing at a time. Also, Music follows the player around everywhere, so they will always hear it no matter where they are from the source entity.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Nickydude
Retired Moderator
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 20th Jul 2008 01:23
Some nice music you have in there.

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 20th Jul 2008 01:49
Lol. This has given me an excellent idea for something to do with your mod Ply. I can't tell you right now, 'cos I want to save it for Izolis, but I'll just say that it's on the list of things that people really want.......

Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 20th Jul 2008 04:37
You could also use plr distance to decrease the volume of the radio.

Minimovies Inc
16
Years of Service
User Offline
Joined: 22nd Feb 2008
Location: Reeedwwwaaallll!!!
Posted: 21st Jul 2008 01:44
Yeah, I was going to suggest that. Is there an action that allows you to decrease the sound volume (NOT music volume)?

A starting Games Designer. Need levels, characters and anything drawn and designed? Let me know...
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 22nd Jul 2008 21:36
Would it be possible to make something like a real radio, were it plays a song, but when you turn it off it continues to play (but you cant hear it) and when you turn it back on it would be at a different point in the song, like a real radio would? (if you know what i mean)
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 22nd Jul 2008 22:26
The problem with the 3D sound is that DBP doesn't support OGG files as 3D sounds. If you port the music to WAV it will work, but will also mean it will have a larger file size.

Little Bill
16
Years of Service
User Offline
Joined: 18th Jun 2008
Location: UK
Posted: 22nd Jul 2008 23:44
Airslide, with that one post you have fixed loads of problems I have been having. Thank you!

Login to post a reply

Server time is: 2024-11-24 11:56:07
Your offset time is: 2024-11-24 11:56:07