SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SHIII Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=195)
-   -   Air raid harbour siren (https://www.subsim.com/radioroom/showthread.php?t=245171)

ArnoldR 05-21-20 08:42 AM

Air raid harbour siren
 
Hello,
In GWX 3.0, I remember that a siren sound was played when a harbour was attacked by airplanes. Does anyone know how this is possible??? There is a special particle in particles.dat (in the library), but how is this particle triggered???
Thank you in advance!
:Kaleun_Salute:

Anvar1061 05-21-20 09:32 AM

https://www.subsim.com/radioroom/ima...aleun_Wink.gif
https://sun1-23.userapi.com/gvuN1AK-...4CdBrJhkNY.jpg

ArnoldR 05-21-20 10:03 AM

@Anvar: Thank you I know! My question is: how this particle is triggered? What is the mechanism that will play this particle when airplanes are spotted???

Fifi 05-21-20 10:08 AM

Quote:

Originally Posted by ArnoldR (Post 2671998)
@Anvar: Thank you I know! My question is: how this particle is triggered? What is the mechanism that will play this particle when airplanes are spotted???

In SH4 it’s triggered by a radius area, meaning when plane enter a predefined radius, siren yells. In SH3 i don’t know, but maybe same?
Probably like the fanfare music playing when you close dock :yep:

Anvar1061 05-21-20 02:26 PM

https://sun1-93.userapi.com/DpBY8bEj...4qyCjEOv_I.jpg

gap 05-21-20 08:03 PM

Quote:

Originally Posted by Fifi (Post 2672000)
In SH4 it’s triggered by a radius area, meaning when plane enter a predefined radius, siren yells. In SH3 i don’t know, but maybe same?
Probably like the fanfare music playing when you close dock :yep:

I can be wrong but I don't think that answers ArnoldR's question. The fanfare is always playing its music, and we only hear it when we get within its audible radius. Conversely the air raid siren is playing only in ports, and only when enemy aircraft are within port's range, so something must be triggering it.

I don't know how that was done by other modders, but the way I would do it, is creating a land or sea unit (it could be just a dummy unit or be shaped as a building or a siren) and equipping it with a fake AA gun. With the appropriate elevation settings, this gun can be made to only fire against enemies which are high on the sky i.e. planes. Gun and visual sensor range settings will help deciding at which range from this "siren unit" anemy aicraft must be, for it to start shooting at them. At this point, all you have to do is giving this gun a good reserve of invisible dummy shells, and using as muzzle flash effect an invisible effect with the siren loop as its sound source.

Place one or two of these units in each port, and the trick is done :03:

Fifi 05-22-20 12:49 AM

Quote:

Originally Posted by gap (Post 2672105)
The fanfare is always playing its music, and we only hear it when we get within its audible radius.

:doh: You may be right then, but sound kind of weird process!
Have to check next time, but it seems to me the fanfare song is starting over from beginning each time we close...meaning it’s not playing non stop. But I’m not 100% sure.

ArnoldR 05-22-20 08:38 AM

I don't think this sound (air raid siren) comes from a special land or sea unit. There's nothing particular in the campaign files IIRC. Maybe you could check them yourself, I don't have them anymore and I can't say for sure. Also nothing special in the Locations files (with the harbours' files). Nothing special with the Navalbase land unit. Maybe this is a special code added to one of the files in SH3 main folder (.act and .dll files?????).

Jeff-Groves 05-22-20 09:45 AM

The Siren is a hidden Gun in a spot light firing a faux shell.
So gap is correct.
I created the whole shebang for GWX!

Perhaps others took it for other mods.
Imitation is the sincerest form of flattery after all!

:salute:

ArnoldR 05-22-20 10:49 AM

Ah, thank you Sir! It was well hidden!!!!

Jeff-Groves 05-22-20 10:57 AM

Quote:

Originally Posted by ArnoldR (Post 2672201)
Ah, thank you Sir! It was well hidden!!!!

The sound file is from a recording from WWII also.
So that is authentic!

gap 05-24-20 07:05 AM

Quote:

Originally Posted by Jeff-Groves (Post 2672180)
The Siren is a hidden Gun in a spot light firing a faux shell.
So gap is correct.

:shucks: :smug:

Quote:

Originally Posted by Jeff-Groves (Post 2672180)
I created the whole shebang for GWX!

Perhaps others took it for other mods.

I think TWoS features air raid sirens as well, but I don't know whether Vecko took them from GWX or created them from scratch. I lean towards the second hypothesis though, because SH5 has an AI bug which makes land units unable to use their guns, so he probably set his siren as an invisible ship or he followed a totally different method.

I should investigate more :hmm2:

Quote:

Originally Posted by Jeff-Groves (Post 2672180)
Imitation is the sincerest form of flattery after all!

Just lol :haha:

Quote:

Originally Posted by Jeff-Groves (Post 2672205)
The sound file is from a recording from WWII also.
So that is authentic!

So cool. On youtube there are sound clips of the Britsh and of the German air siren as well. Do you remember which one did you use?

Quote:

Originally Posted by Fifi (Post 2672125)
:doh: You may be right then, but sound kind of weird process!

It might sound weird, but off my head the one I described is the easiest and most effective method for making a sound to only be triggered when, and only when, there are enemies in range. I am not saying that it couldn't be done differently, but right now I can't think of any other way.

Quote:

Originally Posted by Fifi (Post 2672125)
Have to check next time, but it seems to me the fanfare song is starting over from beginning each time we close...meaning it’s not playing non stop. But I’m not 100% sure.

Yes sure, in order to save computer resources, any sound is unloaded from memory once the player is outside its audible range. That's pretty the same logic used for the rendering of units: they become dimensionless points once they get outside SHIII rendering world, thus losing any damage/ammo storage information. It wouldn't make sense for the game to keep them in memory as 3D objects. Nonetheless, whenever you get again within their rendering range, they are there again with all their properties reset. Just like the fanfare sound starting over from its beginning or some particle effects resetting when they are out of frustum. The factor which triggers them on and off is range from the player. The air raid siren is more complex though, because it must only play when the player is in its audible range AND there is a enemy in its vicinity. Jeff's method takes care of this AND :03:


Quote:

Originally Posted by Jeff-Groves (Post 2672180)
The Siren is a hidden Gun in a spot light firing a faux shell.
So gap is correct.
I created the whole shebang for GWX!

Perhaps others took it for other mods.
Imitation is the sincerest form of flattery after all!

:salute:



All times are GMT -5. The time now is 05:00 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.