View topic - A simple widget for self-d alert



All times are UTC + 1 hour


Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: 26 Jun 2011, 14:14 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
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.


Attachments:
File comment: alert sound
siren3.rar [126.94 KiB]
Downloaded 7 times
File comment: pop sound
pop.rar [7.09 KiB]
Downloaded 8 times
File comment: Autodestruction alert
tp_autodestruction_alert.lua [1.3 KiB]
Downloaded 93 times


Last edited by Jools on 12 Jul 2011, 18:11, edited 1 time in total.
Top
 Offline Profile  
 
PostPosted: 26 Jun 2011, 14:19 
User avatar

Joined: 30 Jun 2008, 23:08
Location: Germany
missing pop-file


Top
 Offline Profile  
 
PostPosted: 26 Jun 2011, 14:34 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
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.


Last edited by Jools on 12 Jul 2011, 18:12, edited 1 time in total.

Top
 Offline Profile  
 
PostPosted: 26 Jun 2011, 14:41 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
Hmmm, I didn't test whether every player can hear the sound, I hope not :)


Top
 Offline Profile  
 
PostPosted: 26 Jun 2011, 15:12 
Moderator

Joined: 12 Oct 2007, 08:24
Jools wrote:
Hmmm, I didn't test whether every player can hear the sound, I hope not :)
It's a widget. They can't.


Top
 Offline Profile  
 
PostPosted: 27 Jun 2011, 07:00 
User avatar

Joined: 30 Jun 2008, 23:08
Location: Germany
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)


Top
 Offline Profile  
 
PostPosted: 27 Jun 2011, 07:30 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
instead of manually adding all commander unit names to the list:
Code:
local commDefs =   {
               UnitDefNames["arm_commander"].id,
               UnitDefNames["arm_ucommander"].id,
               UnitDefNames["arm_u0commander"].id,

...
...
you could loop through unitDefs and do
Code:
if (unitDef.isCommander==true) then add to list end


Top
 Offline Profile  
 
PostPosted: 27 Jun 2011, 17:00 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
Yup, that would have been better, then it would work for any mod.


Top
 Offline Profile  
 
PostPosted: 27 Jun 2011, 17:06 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
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


Top
 Offline Profile  
 
PostPosted: 27 Jun 2011, 19:16 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
Quote:
start units don't need to have iscommander.
in *A mods, they usually are.

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.


Top
 Offline Profile  
 
PostPosted: 27 Jun 2011, 21:25 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
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.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.