Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: How do you mute a .wav?
How do you mute a .wav?
Jul 20 2008, 5:03 pm
By: Al_Zarigus  

Jul 20 2008, 5:03 pm Al_Zarigus Post #1



I need help with my thing here - I'm looping my song here, but I want the song to be muted at anytime when my hero goes to a spot. How do you do it?



None.

Jul 20 2008, 5:39 pm Atlos Post #2



There's no way to stop a .wav that's started playing in game. To work around this you can split the file into several second long parts and link them together with death counts.



None.

Jul 20 2008, 6:02 pm Al_Zarigus Post #3



All right, no hope for me then.



None.

Jul 20 2008, 6:28 pm Kaias Post #4



Its really not that hard. Just break up the song, unless you have to have it stop at that very moment it should be fine.



None.

Jul 20 2008, 7:02 pm Brontobyte Post #5



Trigger("All players"){
Conditions:
Deaths("All players", "Cantina", Exactly, 0);

Actions:
Set Deaths("All players", "Cantina", Set To, 1);
Comment("Start");
}

//-----------------------------------------------------------------//

Trigger("All players"){
Conditions:
Deaths("All players", "Cantina", Exactly, 1);

Actions:
Play WAV("sound\\Bullet\\BlastCan.wav", 0);
Set Deaths(All players", "Cantina", Set To, 2);
Preserve Trigger();
Comment("Sound 1");
}

//-----------------------------------------------------------------//

Trigger("All players"){
Conditions:
Deaths("All players", "Cantina", Exactly, 2);

Actions:
Play WAV("sound\\Bullet\\BlastCan.wav", 0);
Set Deaths("All players", "Cantina", Set To, 3);
Preserve Trigger();
Comment("Sound 2);
}

//-----------------------------------------------------------------//

Trigger("All players"){
Conditions:
Deaths("All players", "Cantina", Exactly, 3);

Actions:
Play WAV("sound\\Bullet\\BlastCan.wav", 0);
Set Deaths("All players", "Cantina", Set To, 4);
Preserve Trigger();
Comment("Sound 3");
}

//-----------------------------------------------------------------//

Trigger("All players"){
Conditions:
Deaths("All players", "Cantina", Exactly, 4);

Actions:
Play WAV("sound\\Bullet\\BlastCan.wav", 0);
Set Deaths("All players", "Cantina", Set To, 5);
Preserve Trigger();
Comment("Sound 4");
}

//-----------------------------------------------------------------//

Trigger(All players"){
Conditions:
Deaths("All players", "Cantina", Exactly, 5);

Actions:
Play WAV("sound\\Bullet\\BlastCan.wav", 0);
Set Deaths("All players", "Cantina", Set To, 1);
Preserve Trigger();
Comment("Sound 5");
}

//-----------------------------------------------------------------//

Variables:

All players - Player(s) who you want to hear the sound.
All players - Player(s) who you want to have the counts for.
sound\\Bullet\\BlastCan.wav - Sound you want players to hear.
Cantina - Unit that will have deaths kept track of.

I'm not sure if you want to have the "play sound" triggers also set the next value for the death counts, or if you want to have a separate trigger that "always" adds "1" or whatever value to the count.

Also, I used the values 1,2,3,4,5 but this would be too fast.

You also need to make sure that the song can be cut up into perfect sections.



None.

Jul 20 2008, 9:05 pm The_z0r Post #6



Quote from Kaias
Its really not that hard. Just break up the song, unless you have to have it stop at that very moment it should be fine.
He may not have a sound-editing program.



None.

Jul 20 2008, 9:14 pm Brontobyte Post #7



Quote from The_z0r
Quote from Kaias
Its really not that hard. Just break up the song, unless you have to have it stop at that very moment it should be fine.
He may not have a sound-editing program.

Well then in this case, it will be hard... :rolleyes:



None.

Jul 20 2008, 9:41 pm M s4 Post #8



Quote from the Zor
He may not have a sound-editing program.

You can download Audacity for free



None.

Jul 20 2008, 9:48 pm Falkoner Post #9



Yeah, Audacity is enough to break up a song, and breaking up a song is also sometimes a better idea anyway, since when someone lags, the music will stop playing earlier, but it will start again sooner, rather than waiting a while after the lag box to start up again.



None.

Jul 21 2008, 7:54 am NudeRaider Post #10

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Search for music, ascending order (the search only gives back the first 10 or 20 results), 3rd hit is this:
How to make Music shut off for only 1 player in bounds




Jul 22 2008, 4:59 am Al_Zarigus Post #11



What I mean is:

I want the music to stop at any moment my man goes into a location...



None.

Jul 22 2008, 5:21 am M s4 Post #12



Yes, you can not do that.



None.

Jul 22 2008, 6:08 am Vrael Post #13



You could if you split the song up into 83milisecond sections, lol.
Or even like, 1 second sections, but that's very impractical, and annoyying to make. But if you REALLY need it, you could split your song up into 1 second sections, that wouldn't be too bad. The 83ms sections would suck because then you'd have thousands of file fragments to string together.



None.

Jul 22 2008, 8:10 am NudeRaider Post #14

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Al_Zarigus
What I mean is:

I want the music to stop at any moment my man goes into a location...
Have you read the topic I linked you to? Like here we ended up discussing about possible workarounds because we realized pretty fast that it's simply not possible.
Quote from Vrael
You could if you split the song up into 83milisecond sections, lol.

Or even like, 1 second sections, but that's very impractical, and annoyying to make. But if you REALLY need it, you could split your song up into 1 second sections, that wouldn't be too bad. The 83ms sections would suck because then you'd have thousands of file fragments to string together.
I do not recommend that because I doubt it is possible to stitch the sound together without at least a small stuttering. Prove me wrong though.




Jul 22 2008, 4:28 pm Falkoner Post #15



Well, as long as you make sure the endings are in multiples of 84 milliseconds, then it should stitch perfectly, but once again, crazy work :P Exactly how long is this song of yours?



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:08 pm]
Sylph-Of-Space -- woah! nice! thank you!
[04:05 am]
O)FaRTy1billion[MM] -- the setting exists, it's just hidden in a weird place
[04:04 am]
O)FaRTy1billion[MM] -- instead change "Microtile Overlay" to "Impassable"
[04:04 am]
O)FaRTy1billion[MM] -- er, wait, idk why i was looking for height
[04:03 am]
O)FaRTy1billion[MM] -- below the minimap should be a thing that says "Overlay Settings" with a little + button in the corner, press the + to expand it, uncheck Use Defaults, then change "Tile Overlay" to "Height"
[03:57 am]
Sylph-Of-Space -- Unless I'm dum (possible)
[03:57 am]
Sylph-Of-Space -- It would be so so so nice if SCMDraft had some kind of dedicated "walkability" view for the tilesets.
[03:53 am]
Sylph-Of-Space -- :'( dont cry for me cat-gentina
[09:18 pm]
Ultraviolet -- 🔪🐈
[2024-5-19. : 12:34 pm]
NudeRaider -- curiosity kills the cat!
Please log in to shout.


Members Online: RIVE, lil-Inferno