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
many thanks - Kate
PS: I wasnt sure if I should post this here or the scripting forum?
Did you miss me? ..... Well get a better sight on your gun hehehe
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.
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.