FSDeveloper Community

Go Back   FSDeveloper Community > Microsoft Flight Simulator development > Aircraft Design > Sound

Sound Use this forum for all sound related discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 06 Oct 2011, 10:20
swift39 swift39 is offline
  ca-britishcolumbia
Location: Chilliwack
Join Date: Jul 2011
Posts: 223
Glide Slope Alert

Ok im on the last one, and of course it's beyond me. Cant figure out the relationship with the -1. Would like this annunciator to "beep" once every time below glideslop annun activitates. Please Help....

Code:
<Gauge Name="Glide Slope Indicator" Version="1.0">
<Update Hidden="Yes">(A:HSI GSI needle, number) 0 &gt;
(L:PlayOnce,bool) -1 == and
if{ 1 (&gt;L:dsd_fsx_sound_id_00,number) 
-1 (&gt;L:PlayOnce,bool) }
(A:HSI GSI needle, number) 0 ==
(L:PlayOnce,bool) -1 == and
if{ 0 (&gt;L:PlayOnce,bool) }
</Update>
<Element>
<Select>
 <Value Minimum="-1" Maximum="1">(A:HSI GSI needle, number) 20 / </Value>
<Case Value="-1">
<Image Name="Below_gs_On.bmp" Bright="Yes"/>
</Case>
<Case Value="0">
<Image Name="Below_gs_Off1.bmp" Bright="Yes"/>
</Case>
<Case Value="1">
<Image Name="Below_gs_Off.bmp" Bright="Yes"/>
</Case>
</Select>
</Element>
<Mouse>
<Area Left="0" Top="0" Width="118" Height="59">
<Cursor Type="Hand"/>
<Tooltip>Below Glideslope</Tooltip>
</Area>
</Mouse>
</Gauge>
Reply With Quote
  #2  
Old 11 Oct 2011, 00:43
swift39 swift39 is offline
  ca-britishcolumbia
Location: Chilliwack
Join Date: Jul 2011
Posts: 223
Relationship with neg values

Can someone explain the relationship when using negative values. I cant figure out why it adding -1 value will not be reconized. Thanks
Greg
Reply With Quote
  #3  
Old 11 Oct 2011, 14:21
n4gix n4gix is offline
  unitedstates
Location: Hammond, Indiana
Join Date: Sep 2006
Posts: 8,556
That variable has a return of (+/- 119), not (+/- 1)!

Change your script to be:

Code:
<Value Minimum="-1" Maximum="1">(A:HSI GSI needle, number) 119 / </Value>
This will scale the output to be -1, 0, 1...

For the <Update> section, you'll also have to properly rescale the variable and fix the logic:

Code:
<Update Hidden="Yes">
  (A:HSI GSI needle, number) 119 / 0 &lt;
  (L:PlayOnce,bool) 0 == and
  if{ 
    1 (&gt;L:dsd_fsx_sound_id_00,number)
    1 (&gt;L:PlayOnce,bool)
    }
  (A:HSI GSI needle, number) 119 / 0 &gt;=
  (L:PlayOnce,bool) -1 == and
  if{ 0 (&gt;L:PlayOnce,bool) }
</Update>
__________________
Bill Leaming
3d Modeler Max/GMax
C & XML Gauge Programmer
Eaglesoft Development Group
http://eaglesoftdg.com

Intel® Core™ i7-3770k 4.2GHz - Crucial 16GB DDR3 - Dual Radeon HD770 1GB DDR5 (Crossfire) - Eco II Watercooling - Win7 64bit
Intel® Core™ i7-2600k 3.4GHz - Crucial 4GB DDR3 - NVIDIA GeForce GTX550Ti 1GB - Win7 64bit
Intel® Core™ i7-860 2.8GHz - Crucial 8GB DDR3 - NVIDIA GeForce GTS240 1GB - Win8 64bit
NOTE: Unless explicitly stated otherwise, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...

Last edited by n4gix; 11 Oct 2011 at 14:29.
Reply With Quote
  #4  
Old 12 Oct 2011, 10:33
swift39 swift39 is offline
  ca-britishcolumbia
Location: Chilliwack
Join Date: Jul 2011
Posts: 223
Thank you so much Bill

Thanks Bill, getting closer. still working the gauge. As of now it beeps randomly and wont reset. Am tweaking to get it working properly, and feel im close. Will post the final result when completed. Thanks for everyones help with these annnunuciators.

Greg
Reply With Quote
  #5  
Old 16 Oct 2011, 13:43
swift39 swift39 is offline
  ca-britishcolumbia
Location: Chilliwack
Join Date: Jul 2011
Posts: 223
Well, this ended up the route to make it work

Well thanks everyone, i dont know how or why, but this ended up working the way i wanted it to. Thanks again.

Greg

Code:
<Gauge Name="Glide Slope Indicator" Version="1.0">
<Update Hidden="Yes">(A:HSI GSI needle, number) 119 / 0 &gt;= 
(L:PlayOnce26,bool) 1 == and if{ 0 (&gt;L:PlayOnce26,bool) }</Update>
<Element>
<Select>
<Value Minimum="-1" Maximum="1">(A:HSI GSI needle, number) 119 / </Value>
<Case Value="-1">
<Image Name="Below_gs_On.bmp" Bright="Yes"/>
</Case>
<Case Value="0">
<Image Name="Below_gs_Off.bmp"/>
<Case Value="1">
<Image Name="Below_gs_Off.bmp"/>
</Case>
</Case>
</Select>
</Element>
 <Element>
 <Select>
 <Value>(A:HSI GSI needle, number) 119 / 0 &lt; (L:PlayOnce26,bool) 0 == and if{ 1 (&gt;L:dsd_fsx_sound_id_26,number) 1 
(&gt;L:PlayOnce26,bool) }</Value>
</Select>
</Element>
<Mouse>
<Area Left="0" Top="0" Width="118" Height="59">
<Cursor Type="Hand"/>
<Tooltip>Below Glideslope</Tooltip>
</Area>
</Mouse>
</Gauge>
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Glide slope indicator bug Adraesh Gauges 2 08 Jun 2011 17:24
Working APAP slope indicator! jonmkj Showroom 1 10 Mar 2009 09:54
Glide Slope capture bray FSX Planner 12 12 Jun 2008 17:56
How do I make a flat slope? dcmiller58 FSX KML 9 15 May 2007 13:57
Grass Texture on Large city Dry LC polygon with slope mendiola_loyola FSX KML 1 04 Jan 2007 01:08


All times are GMT -4. The time now is 07:11.

Kirsch designed by Andrew & Austin


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.