Sign in to follow this  
Guest Matthias Lieberecht

Code works in FS2004 but not FS2002

Recommended Posts

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
Help AVSIM continue to serve you!
Please donate today!

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

Share this post


Link to post
Share on other sites

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

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this