February 17, 201214 yr I have a gauge to detect the events, but I need to know how to play the sound -ONLY- ONE time. The event stays up for a while, so it keeps repeating the sound.For instance using part of my gauge below to detect when the Glideslope Becomes active, usually about 24 miles from touchdown when it detects the NAV1 (ILS) frequency.--if{(A:HSI CDI NEEDLE VALID,bool)if{1 (>L:snd_2,enum)Big picture is I'm just trying to play sounds for (GLIDESLOPE ACTIVE), (LOCALIZER ALIVE), (GLIDESLOPE ALIVE), and (GLIDESLOPE CAPTURED) and for them to play just one time.Thanks in advanceLKL
February 17, 201214 yr Try adding (L:snd_2,enum) 1 == if{ 0 (>L:snd_2,enum) }That should turn it off Bert
February 17, 201214 yr Or this:(A:HSI CDI NEEDLE VALID, bool) 1 ==(L:snd_2_hasbeenplayed, bool) 0 == &&if{1 (> L:snd_2, enum)1 (> L:snd_2_hasbeenplayed, bool)}(A:HSI CDI NEEDLE VALID, bool) 0 ==if{0 (> L:snd_2_hasbeenplayed, bool)} System: i7-10700K, 32GB RAM, RTX4070 12GB, 1 x 1TB SSD, 2 x 2TB SSD, 1x 2TB HDD, Win10 64bit Home, Meta Quest 3
February 17, 201214 yr Moderator I'll just mention that there's a forum just down a few levels dedicated to such questions about aircraft, panel and gauge design... :( Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
February 18, 201214 yr Author Try adding(L:snd_2,enum) 1 == if{ 0 (>L:snd_2,enum) }That should turn it offI tried your suggestion but (L:snd_2,enum) 1 == if{ 0 (>L:snd_2,enum) } will not produce any sound. I have to use as shown below in order to have sound. Here is part of my code<Element><Select> <Value> (L:GAState,number) 2 == I come into this gauge from another gauge and snd1_86 is my actual sound in my sounds.ini file if{ (A:HSI CDI NEEDLE VALID,bool) if{ 1 (>L:snd1_86,enum -or- 1 (>L:snd1_86,enum (==> will give constant repeats of the sound until the condition goes away. I tried every condition using your example but still no fix. Tried to use wothanfja16 suggestion but with no sucess. I will keep trying) </Value> </Select></Element>SUMMARY: I don't get any sounds, unless I use the 2 above and preceeded with the following==> if{ 1 (>L or 1 (>L:Thanks Edited February 18, 201214 yr by LKL
February 18, 201214 yr I said "adding", not substituting.. your code will start the sound,the additional line will turn it off.(A:HSI CDI NEEDLE VALID, bool) 1 ==(L:snd_2_hasbeenplayed, number) 0 == andif{ 1 (> L:snd_2, enum)(L:snd_2_hasbeenplayed, number) 1 + (> L:snd_2_hasbeenplayed, number)}(A:HSI CDI NEEDLE VALID, bool) 0 == (L:snd_2_hasbeenplayed, number) 0 > andif{ 0 (> L:snd_2_hasbeenplayed, bool) }(L:snd_2_hasbeenplayed, number) 10 == if{ 0 (>L:snd_2,enum) }This will play the sound for 10 cycles of the gauge - you can choose this larger or smaller...this is assuming that 1 turns the sound on and 0 turns the sound off. Edited February 18, 201214 yr by Bert Pieke Bert
February 18, 201214 yr Moderator Actually Bert, the 1 only triggers the sound to play once. There's no need to turn it off at all. It's enough to simply quit sending a 1 to the sound trigger! :Nerd:Your solution will still work of course, but the entry for stopping the sound is unnecessary and will simply be ignored. Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
February 19, 201214 yr OK - thanks for clearing that up!In that case:(A:HSI CDI NEEDLE VALID, bool) 1 ==(L:snd_2_hasbeenplayed, bool) 0 == andif{ 1 (> L:snd_2, enum)1 (> L:snd_2_hasbeenplayed, bool) }(A:HSI CDI NEEDLE VALID, bool) 0 == (L:snd_2_hasbeenplayed, bool) andif{ 0 (> L:snd_2_hasbeenplayed, bool) } Edited February 19, 201214 yr by Bert Pieke Bert
February 19, 201214 yr Author I'll just mention that there's a forum just down a few levels dedicated to such questions about aircraft, panel and gauge design... :(Your post above:I don't see the word "GAUGE" in the forum. I just see==>'MSFS Aircraft and Panel Design Forum'Maybe it should read as==> Designing panels and gauges for aircraft in the MSFS series?Just a suggestion.I did re-post it in that forum with hopefully a better explanation on what I was trying to accomplish ThanksLKL Edited February 19, 201214 yr by LKL
February 19, 201214 yr Author I have a gauge to detect the events, but I need to know how to play the sound -ONLY- ONE time. The event stays up for a while, so it keeps repeating the sound.For instance using part of my gauge below to detect when the Glideslope Becomes active, usually about 24 miles from touchdown when it detects the NAV1 (ILS) frequency.--if{(A:HSI CDI NEEDLE VALID,bool)if{1 (>L:snd_2,enum)Big picture is I'm just trying to play sounds for (GLIDESLOPE ACTIVE), (LOCALIZER ALIVE), (GLIDESLOPE ALIVE), and (GLIDESLOPE CAPTURED) and for them to play just one time.Thanks in advanceLKLRE-POSTED IN THE PANELS FORUM
Create an account or sign in to comment