Jump to content
Sign in to follow this  
Guest Matthias Lieberecht

Code works in FS2004 but not FS2002

Recommended Posts

Guest Matthias Lieberecht

Hi All,I'm currently converting a FS2004 panel to FS2002. Except one problem everything is ready. Unfortunately I found no way to solve my existing problem at the moment.I made a spring load switch to increase and decrease the duct temp. When pressing the switch, it moves up and increases the duct temp as long as you press the switch. When releasing the switch, it moves back to the center position. This works perfectly in FS2004, but I do not know why it won't work in FS2002. Here is the code for the mousecklick:Flightdeck Duct Temperature Select %((L:Ducttemp_FD,percent))%!3.1f!

Share this post


Link to post
Share on other sites

Hi Matthias,I don't have FS2002 anymore, but I remember having some probems with Mouse click event in FS2002. So that might well be it.But again, I'm not sure since I can't test it anymore.You could try using this code:(M:Event) 'LeftSingle' scmp ! if{ ..... }(M:Event) 'LeftRelease' scmp ! if{ ..... }Cheers, Rob Barendregt

Share this post


Link to post
Share on other sites

IIRC the (M:Event) was not utilized in FS02. What you may have to do is use the mouse click, set to repeat, and toggle a variable where once this vriable is set to one the code is run then the variable is set back to zero.Regards,Roman


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites
Guest Matthias Lieberecht

Hi Rob and Roman,I've checked Rob's code yesterday evening and it works very good. Thank you very much! The only thing which is not perfect is the flickering tooltip text (caused from the repeat command). Nevertheless this is a problem I could live with. The result is as I want it. When pressing the switch and holding it down, the click sounds one time and the duct temp increase (or decrease in the lower switch area) as long as you press the switch. Releasing it, sets the switch back to the center position.BTW: Another thing I've recognized when converting the panel to FS2002 (just an info) is, that the units radians and degrees did not work perfect for custom variables in FS2002. I've programmed a custom heading bug using degrees and radians. In FS2004 I could use it like the standard heading bug and everything works fine no matter what heading is adjusted. When I decrease the custom heading to a value below 0 (or 360), FS2004 hands over 340

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