Jump to content
Sign in to follow this  
Guest andrewluck

Python and SendMessage function

Recommended Posts

Guest WilliamD

Tony--I have a little idea I want to play around with. Could you please email me a copy of the Yakster source. I downloaded it once from Jeff Davis' website, but can't find it on my old computer...and the links are broken at his page to the Yakster stuff.Thanks.WilliamDbilldubiak@earthlink.net

Share this post


Link to post
Share on other sites
Guest andrewluck

TonyNo, these are adventure scripts so they're designed to be attached to scenario's. However, if global scripts still aren't compiling you could always compile it as a scenario and then subsequently move the .pyc file to the global directory.Andrew Luck18 miles SW EGSH

Share this post


Link to post
Share on other sites
Guest andrewluck

I have to admit to being stumped here. I cannot get a Python script to operate the fuel shutoff valve in the Cessna.Here's the device in flyhawk.gas - Fuel Shutoff Valve (used by Scripts) - fSub kill -- connects to Fuel Shutoff Valve -- shut 1 The script is trying to turn this on and off so I'm using the following fragments:# necessary global messagesfuelMessage = Message(MSG_SETDATA, ID('kill'), ID('st8t'))####################################### Turn on/off the fuel shutoff valve######################################def KillFuel(): global fuelMessage fuelMessage["intData"] = 0 fuelMessage["id"] = MSG_SETDATA SendMessage(fuelMessage)def RestoreFuel(): global fuelMessage fuelMessage["intData"] = 1 fuelMessage["id"] = MSG_SETDATA SendMessage(fuelMessage)######################################This code is identical to other functions that control other systems and appear to work OK so I just can't see where the fault lies here. This is about the last problem I have with the supplied Taking Chances scripts so once I get this cracked then I can release the new scripts. Trouble is, I've been looking at this on and off for a couple of weeks now and can't see the solution. Can anyone help?Andrew Luck18 miles SW EGSH

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...