Radio

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
Molloy
Private
Posts: 7
Joined: Fri May 02, 2003 2:36 am

Radio

Post by Molloy »

Hi peeps, I need to a radio into my map similar to the one in algiers, playin that old funky music.

Can someone tell me how to do this??

Thx in advance. :)
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Music

Post by tltrude »

Right click on the 2d side of the editor and find sound/speaker. Place the speaker above the radio. Highlight the speaker and hit key N. Type the following key/value.

Key: noise
Value: sound/music/mus_berlin.mp3

Also click on the little box that says "AMBIENT-ON". Hit key N again to close it, and save your map.

I think that will work.
Last edited by tltrude on Sun May 04, 2003 9:24 am, edited 1 time in total.
Tom Trude,

Image
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

OR:

$radioname loopsound "sound/music/mus_berlin.mp3"

Or use an alias.
Live to map, not map to live.
-mohaa_rox, .map
moderator
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

script

Post by tltrude »

I don't think the guy even has a script, rox. My way works without one.
Tom Trude,

Image
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

Ok. :wink: Cool. 8)
Live to map, not map to live.
-mohaa_rox, .map
moderator
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

I don't think any sounds without an alias (or in a .mus file) will work :(
Image
Mainframe
Warrant Officer
Posts: 125
Joined: Tue May 13, 2003 9:41 pm
Location: Detroit, MI
Contact:

Post by Mainframe »

thats dope no script for the music .. nice one :P
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

Post by Slyk »

So, what's the verdict on that one??? Tried all I can think of to get a mp3 to play in a room with a radio and NO go either.........
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

tutorial

Post by tltrude »

Did you try the tutorial here: /tutorials/ambient_sounds_new.php .
Tom Trude,

Image
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

Post by Slyk »

Done that tut before for ambients and such and have my background sound working fine...even can get that second sound to play. HOWEVER, being somewhat of an entity/scripting boob, I want to understand how to make that localized sound play. . . Without, hopefully, tweaking the ubersound file. Or, do I need to add a line to it anyway? I want to play a piece of custom music from my radio. I CAN make the radio play certain 'stock' music/sounds, no issue there...just want the custom sound to play and afraid that I have to put a line in the ubersound and then what? Rename it zzzubersound...etc???
panTera
Brigadier General
Posts: 573
Joined: Wed Jan 29, 2003 11:46 pm
Location: The Netherlands
Contact:

Post by panTera »

@ Slyk:
For custom localized sounds:

1) Place a "script_model" anywhere in your map where you want to hear the sound from and give it:
key: model
value: fx/dummy.tik
&
key: targetname
value: speaker1 (example)

2) In the script put this:

thread sound

sound:
$speaker1 playsound youralias //or loopsound

3) For custom sounds create a tiki file and save it in 'main/models/sound/yourdir/..'

The tiki should look something like this:
//////////////////////////////////////////////////////////
TIKI

setup
{
path models/fx/dummy
skelmodel dummy3.skd
}
init
{
server
{
classname ScriptModel
rendereffects +dontdraw
notsolid
}
client
{
settiki none
aliascache youralias sound/yourdir/yoursound.wav soundparms 1.5 0.0 1.0 0.0 300 3000 auto loaded maps "t m dm moh obj train yourbspname"
aliascache morealiases? ... put them here
}
}
animations
{
idle dummy3.skc
}
//////////////////////////////////////////////////////////


4) In the _precache script for your map add the lines..:
'cache models/fx/dummy.tik'
'cache models/sound/yourdir/yourtiki.tik'

.. to load your aliases. I've tested this with custom wav's and it works but only if I added the lines to the _precache. I'm not sure though if this can be done with mp3 files.
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

Post by Slyk »

Thanks for the .scr stuff and idea, I'll give it a go asap and let you know how I screwed it up............I mean, how I did with it! :P
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Failed

Post by tltrude »

My idea of using a speaker to play mp3 music fell through. The speaker will only let you use wav files--click on the sound button in the entity properties window (key N). It would work if you just wanted radio static type sounds.
Tom Trude,

Image
Post Reply