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

ModelDef Right Click not working

Messages
10,163
Country
us-arizona
Hey all,

Trying to get my Right Click to function. Cannot figure out why its not working. I have re-written the click zone a few times.

This is a switch in the ModelDef (a 3d part), not a 2d gauge.

Any idea's? See a issue?

There is no 'click sound' (SND7) which does happen with left clicks. I am trying to stop the sound loop which plays when you first left click the switch. Its a long playing sound, so it only needs to play once. But getting it to cancel just isnt working. I have tried the 3 code (stop loop) and also the all sounds stop code. Nothing works on right click.


Code:
  <PartInfo>
        <Name>lhc_atc1_button</Name>
        <AnimLength>100</AnimLength>
        <Animation>
            <Parameter>
                <Code>(L:SUPER VIKING ATC1 BUTTON, bool) 100 *</Code>
                <Lag>950</Lag>
            </Parameter>
        </Animation>
   <MouseRect>
    <Cursor>Hand</Cursor>
    <TooltipText>ATC Background Chatter One</TooltipText>
   <CallbackCode>
        <MouseFlags>LeftSingle+RightSingle</MouseFlags>
          (M:Event) 'LeftSingle' scmp 0 ==
             if{
                 2 (>L:XMLSND195,enum)
                 1 (>L:SUPER VIKING ATC1 BUTTON, bool)
                 1 (&gt;L:XMLSND7,enum) } 
            (M:Event) 'RightSingle' scmp 0 ==
             if{
                0 (>L:SUPER VIKING ATC1 BUTTON, bool)
                1 (&gt;L:XMLStopSND,enum)
                1 (&gt;L:XMLSND7,enum) } 
   </CallbackCode>
   </MouseRect>
    </PartInfo>
 
Try taking the <MouseFlags> set and place it outside of <CallbackCode>.

ex.
.... <TooltipText>ATC Background Chatter One</TooltipText> <MouseFlags>LeftSingle+RightSingle</MouseFlags> <CallbackCode> (M:Event) 'LeftSingle' scmp 0 == ....

Roman
 
DANG!!!!!!!!!!!!!!!!!!! That was it! A thousand thanks Roman...

Why didnt I see that... 3+ weeks on that code, lolololol... arrghhhh
 
Bill..
Sometimes it takes 2 sets of eyes. ;)
I didn't catch it until I compared it to a known set of working code, similar to what you were trying to achieve.
Looked at it for 20 minutes before comparing! :scratchch At first, it looked all good until that "ah - ha" moment..

Roman
 
Sad to say, although I helped (well, tried to help) Bill, I managed to miss this myself, which is why I suggested the forum for a sanity check... :oops:
 
Back
Top