Page 1 of 1

Help with Radio Music

Posted: Sun May 30, 2004 3:36 pm
by Kate
Hi again everyone :D

I have placed a radio in a room and made a dummy tik script model for the radio. followed the scripting tutorial and the radio played music yipee!!

what I need to know is if there is a radius for the music. I stand in certain parts of the room and hear the radio playing take 1 step back and the radio stops. I can also hear it if I stand directly over it on the floor above.

I would like to be able to hear it in the entire room but not the floor above. I think I can change the parameters of min distance max distance for the room but I am unsure if this will stop it reaching the floor above?

this is my 1st attempt to do a radio and it worked 1st time so I am one happy lady today :D

many thanks - Kate

PS: I wasnt sure if I should post this here or the scripting forum?

Posted: Sun May 30, 2004 5:49 pm
by agentmad007
Hi ,
maybe you should try the map made by Tltrude called mp_ambient2.zip

there is radio there and i think you could find what you are looking for.

he included the .map file too

link

http://smallsumo.leveledit.com/tltrude/index.html

Posted: Sun May 30, 2004 5:58 pm
by blue60007
On the script model you can check off an 'ALWAYS_DRAW' or something like that box. This is in the entity window.

Yes, adjust the min and max distance, that should do it. I don't know about it not reaching the floor above though...

Posted: Sun May 30, 2004 6:20 pm
by Krane
Are you using jv workaround to cache the sound? If yes, find these numbers there, something like 320 2000, or a smaller number followed by a greater number. The first is when the sound starts to fade and the other is when the number fades completly. So for a radio, you can try 150 1500.

speaker

Posted: Sun May 30, 2004 6:46 pm
by tltrude
Your speaker entity does not have to be right over the the radio, so you can move it a little to make the sound reach all corners of the room.

The sound area is a 3d ball. so, to make it not play on the floor above, you have to stop the sound for anyone that goes up there. That can be done with a couple of vis_leafgroup brushes, as seen in the tutorial map that agentmad007 mentioned.

One small vis_leafgroup brush would go around the speaker, and a larger one would go upstairs. The large one targets the smaller one. So, when a player is inside the large one, the small one hides the speaker. In the tutorial map, that happens when a player walks inside the building--the outside speakers are hidden.

Note: My radio does not play the standard radio wave file. It uses an Mp3 and has a trigger the players can use to turn it on and off. Everyone is welcome to use anything they like from my tutorial maps. But, if you use that radio, you'll need to copy the "local.master" lines and the radio thread (for the trigger) to your script.

Posted: Sun May 30, 2004 7:15 pm
by Kate
Thanks guys,

I don't quite understand vis_leafgroup brushes yet but will read up on it and look at the tutorial map. If I get stuck I will let you know :lol:

-Kate