Cockpitbuilders.com
Main => Builders Discussions => Topic started by: jr2mey on July 28, 2017, 08:04:15 AM
Hello all,
Seeing how powerfull PMSystems is, I am wondering if it can trigger an user defined sound event within PMSounds with logics writen in Pmsystems. Example:
if Landinglight=on and flappos>15 and fsaltitude <10000
then playwav= wavefile //something inside Pmsounds
Thanks,
James
I believe the answer to this question is yes..... :D :P
So I like the answer yes ;D but then, what is it im doing wrong. Im am unable to get the event to trigger the user defined sound...This is what is written in my 737 logic file.
if Landinglight=on and flappos>15 and fsaltitude <10000
then playwav= prepland.wav
end if
Just a couple of hunches:
1. maybe you need to reference the fully-qualified filename: eg: C:\Soundfiles\prepland.wav ?
2. Maybe case-sensitivity is in play here? Landinglight is capitalized.. maybe it shouldn't be?
3. Maybe multiple conditions need to be nested?
Instead of: if Landinglight=on and flappos>15 and fsaltitude <10000
Maybe it should be:
if landinglight = on
if flappos > 15
if fsaltitude < 10000
then playwav=prepland.wav
endif
endif
endif
4. I'd also add VS... If verticalspeed < 0 or something. (or whatever it is in PMSystems)
5. Maybe the values are FLOAT values instead of integers: flaps = 15.0?
I literally know nothing about PM systems, but hopefully some of this is helpful...
Awesome Ray!
When I get home I will see if that works. Programming is something that I have never done before and have been trying to decifer what PM has written in its SYS VAR file and mimic.
Actually I'm now in full on learning mode for C++ becuase of this one stuipid little request, LOL. Then thinking about Java after that......well ... maybe if I can learn C++ and not through the computer out into the yard... :o