Log in

View Full Version : Air raid harbour siren


ArnoldR
05-21-20, 08:42 AM
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/images/smilies/Kaleun_Wink.gif
https://sun1-23.userapi.com/gvuN1AK-oIwJu33AVQEZh1o1WwQf-gptdJx5iQ/A4CdBrJhkNY.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
@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/DpBY8bEj0qWLyXXuZjPHs9zLNc7dLZC4evNHMw/-4qyCjEOv_I.jpg

gap
05-21-20, 08:03 PM
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
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
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
The Siren is a hidden Gun in a spot light firing a faux shell.
So gap is correct.

:shucks: :smug:


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:


Imitation is the sincerest form of flattery after all!

Just lol :haha:

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?

: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.


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:


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: