• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Dial Code Help

Messages
153
Country
us-california
Hello All,

I'm having an issue with coding a couple dials in my VC. The dials are the DRP QTY and CVG Level dials. I have the aninimations working correctly except I want them to always start at Line on DRP QTY and 3 on CVG Level.

When I add the 80 in front of the code, the dial starts in the correct spot but I can only move the dial from the 80 key to the 100 key. I know I am probably missing something simple. Any Help would be greatly appreciated.

Code:
<Animation name="s2t_drop_qty_selector" guid="1b997018-cbd2-4690-a998-d151468bd3db" length="100" type="Sim" typeParam2="s2t_drop_qty_selector" typeParam="AutoPlay" />
    <PartInfo>
        <Name>s2t_drop_qty_selector</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                   80 (L:s2t_drop_qty_selector, number) 20 * +
                </Code>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <HelpID>HELPID_DROP_QUANTITY_SELECTOR_SWITCH</HelpID>
            <TooltipID>Drop Qty:%((L:s2t_drop_qty_selector, number))%{case}%{:0}TO/S%{:1}1/4%{:2}1/3%{:3}1/2%{:4}Line%{:5}Salvo%{End}</TooltipID>
            <MouseFlags>WheelDown+WheelUp+LeftSingle+RightSingle</MouseFlags>
              <CallbackCode>           
                 (M:Event) 'WheelUp' scmi ! if{ (L:s2t_drop_qty_selector, number) ++ 100 min (&gt;L:s2t_drop_qty_selector, number) }
                 (M:Event) 'WheelDown' scmi ! if{ (L:s2t_drop_qty_selector, number) -- 0 max (&gt;L:s2t_drop_qty_selector, number) }   
          </CallbackCode>
        </MouseRect>
    </PartInfo>
 

Attachments

  • bandicam 2022-05-20 11-03-50-613.jpg
    bandicam 2022-05-20 11-03-50-613.jpg
    360 KB · Views: 144
Write a short initialization Element. Since L: variables all start at 0 when a plane is loaded, check an L:Initialize_DRP, bool variable if it is zero. If it is, set the two variables you need and then set the L:Initialize_DRP variable to 1. You can name the L: variable anything you like.
 
Back
Top