Stall Horn

User avatar
encoded
Airman
Posts: 24
Joined: 09 Feb 2024, 15:54

Stall Horn

Post by encoded »

Hello!

I recently added a stall horn to the comanche for my own convenience (added new wav to sound folder and included it in the layouts folder). It works weirdly however.

It only plays when you pull hard on the yoke and not when the stall light lights up.

My guess is that you guys simulate the aerodynamics externally and that the stall light is linked to that. Is there any way I can link my own mod to such thing?

User avatar
some1 - A2A
A2A Lieutenant Colonel
Posts: 1833
Joined: 03 Aug 2008, 11:56

Re: Stall Horn

Post by some1 - A2A »

To have it play in sync you have to hook the sound to our simvar (L:LightStallWarning,bool)
Michael Krawczyk

User avatar
encoded
Airman
Posts: 24
Joined: 09 Feb 2024, 15:54

Re: Stall Horn

Post by encoded »

some1 - A2A wrote: 19 Mar 2024, 08:55 To have it play in sync you have to hook the sound to our simvar (L:LightStallWarning,bool)
Thank you for responding! Are you able to please provide more information as to how I can hook the simvar?

My guess would probably be simconnect but I am quite new to it so it isn't quite working right now. Do you by any chance have a video tutorial on how to do this specific thing?

User avatar
some1 - A2A
A2A Lieutenant Colonel
Posts: 1833
Joined: 03 Aug 2008, 11:56

Re: Stall Horn

Post by some1 - A2A »

Easiest way would be probably by adding a new custom sound to sound.xml, linked to the LocalVar posted above. Similar way to how we already have some custom engine sounds defined in our sound.xml.

SDK lists all the parameters you can use.
https://docs.flightsimulator.com/html/C ... gine_sound
Michael Krawczyk

skybluenova
Senior Airman
Posts: 156
Joined: 23 Jul 2023, 13:45
Location: EDHL

Re: Stall Horn

Post by skybluenova »

Great stuff!

Although the Comanche is very hard to stall I would appreciate having the option on the tablet to equip a stall horn. Would you consider this?

Cheers
Dennis
Dennis, FRS94:
Proud member of the FriesenFlieger VA

User avatar
encoded
Airman
Posts: 24
Joined: 09 Feb 2024, 15:54

Re: Stall Horn

Post by encoded »

some1 - A2A wrote: 20 Mar 2024, 04:06 Easiest way would be probably by adding a new custom sound to sound.xml, linked to the LocalVar posted above. Similar way to how we already have some custom engine sounds defined in our sound.xml.

SDK lists all the parameters you can use.
https://docs.flightsimulator.com/html/C ... gine_sound
Thank you so so much for your help! I've successfully linked it and it works!

Only problem currently is that since the light flashes instead of remaining on (by design obviously) so the sound cuts in and out because the bool is constantly changing with the flash. Any suggestions as to how to get past this?
Last edited by encoded on 20 Mar 2024, 12:55, edited 1 time in total.

User avatar
encoded
Airman
Posts: 24
Joined: 09 Feb 2024, 15:54

Re: Stall Horn

Post by encoded »

I'd also love to link it to the stall tab test during the walkaround, could you please provide the simvar for that?

User avatar
Michal - A2A
A2A Lieutenant Colonel
Posts: 932
Joined: 29 Sep 2006, 19:39
Contact:

Re: Stall Horn

Post by Michal - A2A »

encoded wrote: 20 Mar 2024, 12:03 I'd also love to link it to the stall tab test during the walkaround, could you please provide the simvar for that?
It's (L:Action_StallWarning,bool) for both animation and interaction, it's 1 on click and 0 on release, you have to remember to zero the variable.

User avatar
encoded
Airman
Posts: 24
Joined: 09 Feb 2024, 15:54

Re: Stall Horn

Post by encoded »

Michal - A2A wrote: 21 Mar 2024, 03:33
It's (L:Action_StallWarning,bool) for both animation and interaction, it's 1 on click and 0 on release, you have to remember to zero the variable.
Thank you, it works!

I was hoping to be able to hook the stall light sound to the stall tab but unfortunately it seems it's just a simple test animation during the walk around and doesn't actually move in a in-flight stall.

I tried adding a fade out effect to the sound to try and "delay" the sound but that doesn't seem to work either.

None of the other universal sound attributes seem to be a fit either

User avatar
encoded
Airman
Posts: 24
Joined: 09 Feb 2024, 15:54

Re: Stall Horn

Post by encoded »

I'm looking at code_pa24_m.xml and can't for the love of christ figure out what makes the light flash, it's just if statements!

Code: Select all

 <Element>
  <Select>
   <Value>
(L:Paused,bool) 0 ==
if{
		
	(L:Headphones) (L:HeadphonesStored) ! == 
	if{
		(L:Headphones) 1 ==
		if{
			(L:NoiseCancellingSwitch,bool) 1 ==
			if{ 2 (&gt;L:Headphones) }
		}

		(L:Headphones) (&gt;L:HeadphonesStored)
	}
	
		
	0 (&gt;L:LightStallWarning,bool)

	
	(L:ElecPower,bool) 1 ==
	if{
		(A:RELATIVE WIND VELOCITY BODY Z,mph) 9 &gt; (L:BreakerWarningStall,bool) 1 == and
        	if{
            		(L:AoA) 5 &gt; (L:HalfSec,number) 1 == and
            		if{
                		1 (&gt;L:LightStallWarning,bool)
            		  }
        	   }
	
		20 30 (L:StallWarningAnim,percent) rng 45 55 (L:StallWarningAnim,percent) rng or 70 80 (L:StallWarningAnim,percent) rng or
		if{
			1 (&gt;L:LightStallWarning,bool)
		}
	}
	
	...Continues below

User avatar
Michal - A2A
A2A Lieutenant Colonel
Posts: 932
Joined: 29 Sep 2006, 19:39
Contact:

Re: Stall Horn

Post by Michal - A2A »

Stall light flash is in the different file. It's in PA24_250_INTERIOR.xml, it's just single component with the default EMISSIVE_CODE tag:

Code: Select all

<Component ID="LIGHT_stall_warning" Node="DASH_LIGHT_stall_warning"> 
	<UseTemplate Name="ASOBO_GT_Emissive_Gauge">
		<EMISSIVE_CODE>(L:LightStallWarning,bool) 8 *</EMISSIVE_CODE>
	</UseTemplate>
</Component>

User avatar
encoded
Airman
Posts: 24
Joined: 09 Feb 2024, 15:54

Re: Stall Horn

Post by encoded »

Michal - A2A wrote: 22 Mar 2024, 16:04 Stall light flash is in the different file. It's in PA24_250_INTERIOR.xml, it's just single component with the default EMISSIVE_CODE tag:
Thanks but that doesn't seem to be it? When completely removing it and testing in-game there's still a much fainter light that flashes

User avatar
encoded
Airman
Posts: 24
Joined: 09 Feb 2024, 15:54

Re: Stall Horn

Post by encoded »

Is there maybe another simvar I can hook to that doesn't change itself constantly like LightStallWarning?

Thanks for your patience!

User avatar
Scott - A2A
A2A General
Posts: 16839
Joined: 11 Feb 2004, 12:55
Location: USA
Contact:

Re: Stall Horn

Post by Scott - A2A »

encoded wrote: 22 Mar 2024, 17:35 Is there maybe another simvar I can hook to that doesn't change itself constantly like LightStallWarning?

Thanks for your patience!
Sorry if I missed something in this post, but have you tried (L:LightStallWarning,bool)?

Scott
A2A Simulations Inc.

User avatar
encoded
Airman
Posts: 24
Joined: 09 Feb 2024, 15:54

Re: Stall Horn

Post by encoded »

Scott - A2A wrote: 25 Mar 2024, 06:31
Sorry if I missed something in this post, but have you tried (L:LightStallWarning,bool)?

Scott
Hey Scott, thanks for answering. That variable does work but since it's a bool that rapidly changes from 0 to 1(because the light flashes) it means that the sound rapidly stops and starts with it. I was hoping to find something that remained consistent until the end of the stall

new reply

Return to “Comanche 250 for MSFS”

Who is online

Users browsing this forum: No registered users and 3 guests