Jump to content
The simFlight Network Forums

srd

Members
  • Posts

    9
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    N. California

srd's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks Pete, I'll do that. Steve
  2. Ok Paul, your script worked just great. Thank you! Now I have an issue with the following script. The log file says "waiting for input" . Nothing happens when I press the 0,1 or 2 key. Any thoughts? What I'm trying to achieve is to show a list of different checklists and by selecting the one you want, opens the associated .lua file. I would really like to be able to mouse over an item and click to go to the specific list. But that's for another time... Thanks, Steve ref = sound.play("F:\\FSX\\Sound\\wavefiles\\senecaII\\Are you ready for the prestart checklist Steve.wav") ipc.lineDisplay("1. Cancel Checklists", 1) ipc.lineDisplay("2. Pre-Flight Checks", 2) ipc.lineDisplay("3. Pre-Start Checks", 3) function callNew0(keycode, shifts) ipc.lineDisplay("Checklist terminated by pilot") ipc.sleep(2000) ipc.exit() end function callNew1(keycode, shifts) ipc.runlua("F:\\FSX\\Module\\Listtest.lua")--runs another lua program end function callNew2(keycode, shifts) ipc.runlua("F:\\FSX\\Module\\Listtest1.lua")--runs another lua program end event.key(48, 8, "callNew0") --key 0 unshifted event.key(49, 8, "callNew1") --key 1 unshifted event.key(50, 8, "callNew2") --key 2 unshifted
  3. Thanks a bunch Paul, I understand it a lot better now. I was under the assumption that the script didn't start executing the next function until it was finished with the current one. I'll give your input a try , get it to work, learn more and have fun. Cheers, Steve
  4. Hi Paul, Thanks for the response. I was thinking that the first function would run until it was true which then stopped the event.timer for that function, then move to the next function until true, stop that event.timer and move to the last function until true. It seemed I needed to stop the event timer each time or the sound file kept looping. I'm not understanding why replacing the previous event.timer is a bad thing. Is there a way to check that the sound file has played and if true, move to the next function? I'm trying to make these functions and more part of a single checklist type script. Could I have the first function call the second function and then it would call the third function? Any doChecks() examples you know of or can point to? or other thoughts? Thanks, Steve
  5. Hi Pete, I've made progress ( for me) in my little project. The items I've been working on all work the way I'd hope them to by themselves. When I put them in succession though, the first 2 functions are bypassed and only the last function runs. Clearly I'm missing something. Any thoughts? Thanks, Steve function checkAlive() ias = ipc.readUD(0X02BC)/128 ipc.lineDisplay("Airspeed="..ias) if ias >= 25 then sound.play("F:\\FSX\\Sound\\wavefiles\\senecaII\\Airspeed alive.wav") ipc.lineDisplay("Airspeed alive") event.cancel("checkAlive") end end event.timer(500, "checkAlive") function checkIAS() ias = ipc.readUD(0X02BC)/128 ipc.lineDisplay("Airspeed= "..ias) if ias >= 60 then sound.play("F:\\FSX\\Sound\\wavefiles\\senecaII\\70 knots rotate.wav") ipc.lineDisplay("Rotate") event.cancel("checkIAS") end end event.timer(500, "checkIAS") function checkRALT() radio_alt = (3.281/65536)*ipc.readUD (0x31E4) radio_alt = math.floor(radio_alt + 0.5) ipc.lineDisplay("AGL= "..radio_alt) if radio_alt >= 200 then sound.play("F:\\FSX\\Sound\\wavefiles\\senecaII\\Positive climb rate gear up.wav") ipc.lineDisplay("Positive climb rate") event.cancel("checkRALT") end end event.timer(500, "checkRALT")
  6. Thanks Pete, I'll try to incorporate your suggestions. My real issue is the lack of lua coding knowledge, which causes me to fall back to what little coding I did do way back when. I would very much like to simply write the lua code, but you don't always get what you want. So I'll keep trying, learning, and asking for help. Thanks again Pete, Steve
  7. Thank you Pete. I did try the ground flag and that worked as it should, but then again with the checklist being a list of items that must be confirmed to move to the next item, you have to be on the ground to use this list so I may or may not need to check this condition. As far as knowing when I'm on the runway, one or two checklist items right before the takeoff roll would require the plane to be on the center line ready to go. So if I use something like (with the right format) : if ias = =( >=10 knots) then play sound (airspeed alive) else loop --until true this should trigger the event ? Steve
  8. Thanks Pete, Unfortunately I'm just not getting it. The Offset Status list shows: Offset 02BC, 4 bits, IAS as knots * 128. I don't know what to do with the "record to csv" other then to try and use the timer event once I get the basic script working how I invasion it. I've tried working with a few other scripts, modifying them, learning how they do what they do. I'm missing so much when it comes to watching the IAS and setting a value which when "true" will then play a sound file. What I would like to do is to: as part of a check list, when on the runway and on the takeoff roll, trigger a voice file ( i can do that) when the airspeed comes alive (say at 10 knots) and then another one when rotation speed is reached. If you can point me in some direction as to or where to learn how to do that, it would be much appreciated. I do tend to learn best by example. Thanks for the help, Steve
  9. I want to create a plug-in that will monitor the airspeed, and when it reaches a preset value, triggers a wav file. I can't seem to find the right event handler, and not sure what format the preset airspeed should be in. Anyone able to shed some light on a script that would handle this type of need? Thanks, Steve
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.