Jump to content
Sign in to follow this  
Guest Mathias

Communication between scenery and a gauge

Recommended Posts

Guest Paavo

Hi,are there any user variables in FS that can be accessed by both scenery objects and gauges? I'm working on a fully functional pushback truck and I need some sort of a way to pass information to the truck through a gauge. I've already programmed a simple object that's always relative to user aircraft and I animated it. When Nav2 (Nav2 is NOT a good solution, I really want to make it depend on usrvar*) is set to 115.00, tug pops up right of aircraft (it will be outside of VC's viewing range so when you are in VC you will not see how it pops up) and drives to front gear.But I don't know how to activate Flight Sim's pushback function through scenery object. I believe the best solution would be making a pushback gauge, which would work in the following order:1. User selects pushback settings (distance etc.) and clicks on "Start Pushback" button.2. Gauge sets usrvar to "1" and stops for 30 seconds (animation length).3. Tug checks for usrvar. Usrvar is "1" (since gauge set it so) and the animation starts (tug drives into the position).4. When 30 seconds have passed, gauge will turn on Flight Sim's pushback function. 5. When pushback has finished, gauge sets usrvar to "0".6. Tug checks for usrvar. Usrvar is "0" (since gauge set it so) and the reverse animation starts (tug drives away and then dissapears when it's outside of VC's viewing range).As I said, there are no other obstacles than the gauge. The most important question is: can gauge access usrvar? If not, then what other similar variables are available?I have never programmed gauges and I know very little about them. Any help would be appreciated. It would be superb if somebody could post some source codes of pushback gauge (and comment how it works).---* It would be great if I could use usrvar, but can a gauge read and write it? I know scenery can.

Share this post


Link to post
Share on other sites
Guest Mathias

Search for "pushback" here at avsim or at flightsim.com and you should find all sorts of helpful stuff. One of the packages is programmed in XML format so you can educate yourself from that to a certain degree.

Share this post


Link to post
Share on other sites

Hi Paavo,I would really want to help out here, if only I knew what "usrvar*" is :-). So I can't help there.But something based on Nav2 (or ADF2) for communication wouldn't be a problem.I have made a Pushback gauge a few years ago which I adapted for FS2004 (it's in XML). If you have a look at file rcbgh-32.zip, you can see what it does.This gauge could easily be adapted for use with your PB truck.Using the standard FS pushback function (like my gauge does) does have a drawback though:- After a Turn command the aircraft always continues straightback for another aircraft length.- Turn angle is max. 90 degrees left or right.If you're interrested, contact me via normal EMail (see zip file).I would be very interrested to know how your PB truck works. The trucks I know (like in the new Posky 767) are moving very unrealistic when the aircraft is in a turn: the truck remains in line with the longitudinal axis of the aircraft (hence the truck moves sideways during the turn) instead of following the aircraft's nosewheel path.What does your truck do ?Cheers, Rob Barendregt

Share this post


Link to post
Share on other sites
Guest Mathias

>>Cheers, Rob Barendregt>Yes, this is the creator of the XML pushback gauges I was referring to ;-)Thanks Rob for directly responding!

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...