A simple widget for playing a sound when commander is about to self destruct. Plays a "pop" sound when self-d is cancelled. Tested with xta.
Where have the self-d countdown sounds gone anyway?
(NB: it plays a soundfile called siren3.ogg ands pop-wav in folder LuaUi/sounds. Can be changed.)
Edit: changed to filetype to ogg to save space, and to enable stopping the soundstream if self-d is cancelled.
A simple widget for self-d alert
Moderator: Moderators
A simple widget for self-d alert
- Attachments
-
- siren3.rar
- alert sound
- (126.94 KiB) Downloaded 11 times
-
- pop.rar
- pop sound
- (7.09 KiB) Downloaded 14 times
-
- tp_autodestruction_alert.lua
- Autodestruction alert
- (1.3 KiB) Downloaded 110 times
Last edited by Jools on 12 Jul 2011, 19:11, edited 1 time in total.
Re: A simple widget for self-d alert
missing pop-file
Re: A simple widget for self-d alert
Here it is. I had one already included with spring so I thought it was present by default.
I'd like to set the volume a bit higher, but didn't immediately find out how to. Even tried amplifying the sample with audacity, but no change.
I'd like to set the volume a bit higher, but didn't immediately find out how to. Even tried amplifying the sample with audacity, but no change.
Last edited by Jools on 12 Jul 2011, 19:12, edited 1 time in total.
Re: A simple widget for self-d alert
Hmmm, I didn't test whether every player can hear the sound, I hope not :)
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: A simple widget for self-d alert
It's a widget. They can't.Jools wrote:Hmmm, I didn't test whether every player can hear the sound, I hope not :)
Re: A simple widget for self-d alert
i wanted to upload it on the wddb, thats why i asked fot the pop.wav (just to make it complete, dunno if this wave file is included in a blank install-pack)
Re: A simple widget for self-d alert
instead of manually adding all commander unit names to the list:
you could loop through unitDefs and do
Code: Select all
local commDefs = {
UnitDefNames["arm_commander"].id,
UnitDefNames["arm_ucommander"].id,
UnitDefNames["arm_u0commander"].id,
...
...
Code: Select all
if (unitDef.isCommander==true) then add to list end
Re: A simple widget for self-d alert
Yup, that would have been better, then it would work for any mod.
Re: A simple widget for self-d alert
Actually it wouldn't, start units don't need to have iscommander.
You could use GetTeamInfo + GetSideData to find the start unit or just catch the first unit spawned for each team using UnitCreated
You could use GetTeamInfo + GetSideData to find the start unit or just catch the first unit spawned for each team using UnitCreated
Re: A simple widget for self-d alert
in *A mods, they usually are.start units don't need to have iscommander.
Actually, thinking about it instead of playing a sound it should prevent you from blowing up the commande accidently. ie make you confirm the command a second time.
Re: A simple widget for self-d alert
But sometimes you want to commbomb, and then you don't have time to confirm stuff. No matter how cowardous it is to do so, we can't deny that in some situations it's a smart choice.
But OTA had countdown sounds on self-d, like this: choop, choop, cheep, chiip, chiiip, BOOM.
But OTA had countdown sounds on self-d, like this: choop, choop, cheep, chiip, chiiip, BOOM.