Staredit Network

Staredit Network -> UMS Assistance -> How can I prevent a sound from playing ?
Report, edit, etc...Posted by Mydas on 2007-01-04 at 05:39:51
I use a Stargate spell system, but I don't want the "It is a good day to die" and stuff like that to play. How can I prevent it ?
Report, edit, etc...Posted by Gigins on 2007-01-04 at 05:49:36
Mute unit speech will disable any unit sounds automatically played. happy.gif
Report, edit, etc...Posted by Mydas on 2007-01-04 at 06:37:51
And I can do that with triggers ?
Report, edit, etc...Posted by Ihjel on 2007-01-04 at 06:54:04
Yea its an action called "Mute Unit Speech"
Report, edit, etc...Posted by Heegu on 2007-01-04 at 07:11:04
And if you want to hear the sounds again, use unmute unit speech. Simple!
Report, edit, etc...Posted by Puddin on 2007-01-04 at 11:06:55
Although, mute unit speech doesn't stop Wav's imported into the map. If you have a Wav such as a footstep sound, mute unit speech won't stop the footstep sound.
Report, edit, etc...Posted by Mydas on 2007-01-04 at 11:38:56
This mute thing is interesting. But I dunno how to use it for what I need.

I need all sounds to play normally. Then, when I cast a spell (build a Stargate ship), I want to mute the sounds so there's no Carrier has arrived and such; and after a bit of time, to resume the speech so I can play my own sounds.

Any ideas ?
Muting the speech after a sound has already begun playing has no effect whatsoever.
Report, edit, etc...Posted by Mp)Blu on 2007-01-04 at 11:43:44
Mute Unit speech only mutes the units from saying anything when you click on them or right click.
Report, edit, etc...Posted by Mydas on 2007-01-04 at 13:41:32
No, it actually mutes all their sounds (it sure as hell mutes the 'has arrived' sound =))
Report, edit, etc...Posted by JaFF on 2007-01-04 at 14:00:19
Do you have any other protoss units that you controll in the game? When you start building a carrier (we know the minimum speed is 1/13 of a second? correct me if I'm wrong here), it takes up a certain amount of supplies when building is in process. If you detect a change in supplies, you might turn off unit sounds before it's built, and turn them on again after.

Problems here: I'm not an experienced enough mapper to know is that what I said possible, and I don't know will the supplies increase in such a short time, and I don't know how to detect them. tongue.gif

You can try to use other systems, such as the dropship system, or the movement system (when you hotkey a unit and detect when it moves)
Report, edit, etc...Posted by Mydas on 2007-01-04 at 14:23:34
Thank you for your feedback, JaFF. I am using indeed other protoss units in the map, and I don't know if supplies can be detected. But a fresh idea, indeed ...

The dropship and movement system do not serve me enough. I find it the most appropriate for spell usage, with spells that can save your life ...
Report, edit, etc...Posted by fritfrat(U) on 2007-01-04 at 15:29:28
Detecting supplies would require EUDs and a consistent amount of other protoss units.. probably not worth it.

I really can't think of a way to do it without a lasting mute unit speech.
Report, edit, etc...Posted by Oo.Insane.oO on 2007-01-04 at 15:45:55
QUOTE(fritfrat(U) @ Jan 4 2007, 03:29 PM)
Detecting supplies would require EUDs and a consistent amount of other protoss units.. probably not worth it.

I really can't think of a way to do it without a lasting mute unit speech.
[right][snapback]609888[/snapback][/right]


This might work


Trigger
Description:
Muting
Players:
¤ Whatever you want
Conditions:
¤ Current player brings atleast 1 'anyunit' to location 'whatever'
Actions:
¤ Mute unit sound
¤ Do rest of your action
¤ wait 100 milliseconds
¤ Unmute unit sounds
¤ Preserve trigger

Report, edit, etc...Posted by fritfrat(U) on 2007-01-04 at 15:49:07
I didn't think that would work, because the unit makes the sound the second it is created, but you can try it if you want.
Report, edit, etc...Posted by IsaT on 2007-01-04 at 15:51:31
Solution:

Make the units cost 1 mineral/gas each/ and set the players minerals.gas to 1 at the beginning of the map.

Set the units build speed a bit faster than the fastest build time, so it has time to detect and run the trigger.

When the player has no minerals/gas, disable unit speech, wait 2 seconds or so, then resume unit speech, and finally give the player back one mineral/gas.
Report, edit, etc...Posted by JaFF on 2007-01-04 at 15:58:15
And if the resources are used as vairables and/or for upgrades? You can put some things in deathcounters/score, but things like upgrades require minerals/gas.
Report, edit, etc...Posted by PCFredZ on 2007-01-04 at 17:18:41
Mydas, be satisfied with Mute Unit Speech filtering out all the game sounds, because your additional demands are getting a lot of weak spammy suggestions.

By the looks of what you've said, you seem to want to only disable the unit spawn sound for spellcasting. Don't be too obsessed with it, that extra voice really won't ruin the aesthetics of a map.
Report, edit, etc...Posted by Mydas on 2007-01-04 at 17:20:24
It's a spell ... so it uses gas in my case. I could try to detect when the gas goes down - that means that a spell was cast and I should mute the speech for one second. But how do I detect the gas going down ?


Damn the lack of variables.
Report, edit, etc...Posted by Tuxedo Templar on 2007-01-04 at 18:04:38
Yeah you'd use resources to detect a unit being built.

How? Well that is where things can get tricky. Depending upon your system you'll have to learn some binary countoff and math stuff (specifically subtraction). Basically what you do is use two counters for your mana: Gas and an unused death counter. Anything in the triggers that adds or removes your gas mana adds and removes from the DC mana as well. That way they stay perfectly mirrored.

Then you need to do subtraction and restoration. Every trigger loop. Use a binary countoff to subtract your gas from the DC (storing the amount counted off in a 3rd backup counter), check if the two mana counters are both 0, then add the contents from the backup counter back into both. You will know if a unit has been built or gas has been used if your gas mana counter reaches 0 but your DC mana doesn't (during the subtraction).

Then just set a switch or something, set the DC mana to 0, then add back into both the amount in the backup counter and continue like normal. Use the switch to then disable the unit sounds for however long it takes the unit to finish building.


Ain't triggers fun?
Report, edit, etc...Posted by Red2Blue on 2007-01-04 at 18:31:10
Mydas


Although all of these options are ways to get around your problem... it simply goes down to:

Why?

What's the point of muting "It is a good day to die"? Does it impact gameplay enough that it would hinder your map? Is it that annoying? Aren't there alternatives to your overall ending effect? There are always ways around things, but this is an exception. Are you willing to overwork yourself and stress over something that can simply be ignored or even unnoticed? If all sounds are muted, couldn't you simply add your own sound effects?



Just because you can do something doesn't always mean you should.




And as a side note: Even if you mute the sounds using a trigger, you can still hear many of the sound effects; only faintly however.
Report, edit, etc...Posted by Mydas on 2007-01-05 at 06:02:18
I simply want that when a Corsair in my case comes out, instead of "It is a good day to die", Archon's "Annihilate" should play. It's a Rpg, I think it's way better if the unit speech is not disabled all day long.

Would you like to play a RPG map where none of your units speak ?

My immediate solution was to just wait a second or two before playing the "Annihilate" sound, so it doesn't overlap with the corsair. I don't still this satisfies me, though ...

And Tuxedo Templar, your idea is interesting; but constantly adding and substracting gas seems to be really screwed up, especially with the usual mana regeneration (gas income).
Report, edit, etc...Posted by Red2Blue on 2007-01-07 at 06:33:20
Well Mydas, the members here have laid out the options for you on the table and you can choose from their assortment of answers. Any other kinds of modification are simply taste related.



So, aside from that, this topic is concluded.

QUOTE(Mydas)
My immediate solution was to just wait a second or two before playing the "Annihilate" sound, so it doesn't overlap with the corsair. I don't still this satisfies me, though ...




Closed~
Next Page (1)