![]() |
Question about sound. Hello. I'd like to set my map so that when the objective is taken, the background music changes. I know this will probably have to be done in the script. I have searched the tutorials and none have an explaination of this. I have a few target_speaker entities in the map, so when objective is taken I'd like another target_speaker to play, I will make it global by setting the radius high. So I need the other ones to turn off and this one to turn on when OBJ taken. I understand how to use the accum tag in a script file, but how do I set the accum tag to reference the target speaker? Or if there is another way, please let me know Thanks :rock: :rock: :rock: "Rock N Roll Ain't Noise Pollution" |
ok im not 100% sure but you should beable to do it in the script, I havent had a propper look and aint been able to try it. But it might work. In your script you will need to put playsound sound\sound directory\soundfile.wav where sound directory is the folder the .wav file is and soundfile.wav is the actual wav file. it will prob need to go after the trigge rpart of the script for the obj. I cant say exactly, ages since I did obj in a map. If you cant get it to work lemme know i will see what I can do/find out. |
1 Attachment(s) its somewhere in here am shoure but if the obj is taken cant the music turn of and more music turn on? |
lol niceone cheat saved me dragging it out of cd. Anyway it looks like its the following part of the script. trigger allied_object_stolen { // Change the objective state internally, so UI can update, etc. // Allied have stolen the documents (0 == AXIS, 1 == ALLIED) wm_set_objective_status 1 0 trigger RadioMover set_one trigger RadioMover song_alert trigger RadioMover only_once } trigger allied_object_returned { // Change the objective state internally, so UI can update, etc. // Axis have returned the documents (0 == AXIS, 1 == ALLIED) wm_set_objective_status 1 1 trigger RadioMover set_zero trigger RadioMover back_to_norm trigger RadioMover song_alert Now it looks like the way its been done is by adding a target_speaker that is targeted by the objectives. So I suggest you try doing that. You could try this in your script at the part where it says allies take obj or axis take em, which ever u got make it like the example below. i will use allies as taking obj for this example. trigger allied_object_stolen playsound/soundfolder/soundfile.wav { Hopefully that will play a sound when allies take the obj do the same for return if you want a different sound. boner if you wish i can take a look at the map and script and try figure it out. No promises or out but offer is there if needed. |
OK Hotshot, what you say night work but not for what I'm trying to do. Let me explain a little better. I don't want to play a sound through the script file because my target_speaker is coming from an Allied truck playing only in the Allied Spawn(some good old Rock N Roll, YeeHaww!!) If I use a sound in script it would be global. So what I need to do, is set it so that 1 accum tag turns off the sound coming from the target_speaker in Allied Spawn, and another accum tag turns on another target_speaker I have set to play music for when Allies have OBJ. So basically, I need the script to reference the target_speakers. I'm trying some combinations of scripting and target_speaker commands, I'm sure I'll get it. Anyway, if you have any ideas, can you let me know? |
| All times are GMT -7. |
Powered by vBulletin®
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.