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

Puzzle Time :)

Messages
19
Country
malta
OK .. Prizes will be awarded here to anyone who can tell me

WHY the following code

Code:
 	<PartInfo>
		<Name>PIN_REMOVE_BEFORE_FLIGHT</Name>
		<AnimLength>100</AnimLength>
		<Animation>
			<Parameter>
				<Code>(L:RBF_pin, bool) 100 *</Code>
			</Parameter>
		</Animation>
			<MouseRect>
				<Cursor>Hand</Cursor>
				<TooltipText>BRS SAFETY PIN</TooltipText> 
				<MouseFlags>LeftSingle</MouseFlags>
				<CallbackCode>
				(L:BRS_Handle, bool) 0 ==
				if{ (L:RBF_pin, bool) ! (&gt;L:RBF_pin, bool) }
				</CallbackCode>
			</MouseRect>
	</PartInfo>

Prevents doors, 2, 3 and 4 from operating via Keypress :)

I have spent a week on this sudoku so far
LMAO

anyone ??
 
(&gt;

as in "! (&gt;L:RBF_pin, bool) }"

...can that be right?

Mind you this from somenone who doesn't understand a thing about xml...
 
That's simple. You are flooding FS with continuous commands, thereby blocking any secondary commands from being detected.

Change your mouse callback to be "single-shot."

Code:
<CallbackCode>
	(L:RBF_pin, bool) ! (&gt;L:RBF_pin, bool)
</CallbackCode>
 
Fair comment .. but wont that miss out the check for the extra Var ?

(L:BRS_Handle, bool) 0 ==

I dont want RBF_PIN bool switching to1 IF the BRS_HANDLE = 1


Its Like an ejector seat pin, you cant put in back in if its been fired :)

EDIT AFTER TEST

+ Just tried the "single shot" method, to no avail
 
Last edited:
Fair comment .. but wont that miss out the check for the extra Var ?

(L:BRS_Handle, bool) 0 ==

I dont want RBF_PIN bool switching to1 IF the BRS_HANDLE = 1

Oops! That's what I get for replying before having drunk my morning coffee!

In that case, try this:

Code:
</CallbackCode>
     (L:BRS_Handle, bool) 0 == if{ 1 (&gt;L:RBF_pin, bool) }
</CallbackCode>
 
LOL

I NEVER do anything before a proper English breakfast..
COFFEE COFFEE SMOKE SMOKE COFFEE COFFEE SMOKE
:)

Thanks I'll try that, but for the sake of my "learning" ..
Can you please explain the differences ?

cheers !

Also .. just spotted another "oops"

your suggestion wont allow for replacing the pin AFTER Flight if the BRS hasn't been fired :)

I know .... it looked easy to me at first too ;)
 
Last edited:
As it happens, I programmed the BRS for the Eaglesoft Cirrus SR20/22 series, so I'm somewhat familiar with the steps and concepts... :D

For the sake of utter simplicity (K.I.S.S. principle), I used one "master L:variable" that simply "steps" through the four tasks required:

0 = default
1 = pin removed
2 = handle cocked
3 = handle pulled

This seemed to my pea-sized brain to be the easiest approach.

However, sticking with your proposed approach, the simplest would be to divide the options between a left click/right click mechanism.

Code:
      <MouseFlags>LeftSingle+RightSingle</MouseFlags>
      <CallbackCode>
        (M:Event) 'LeftSingle' scmp 0 ==
                (L:BRS_Handle, bool) 0 ==
                and
             if{ 1 (&gt;L:RBF_pin, bool) }
        (M:Event) 'RightSingle' scmp 0 ==
                (L:BRS_Handle, bool) 0 ==
                and
             if{ 0 (&gt;L:RBF_pin, bool) }
      </CallbackCode>

On the other hand, upon reflection I have to wonder... are you absolutely sure that it was your first approach that was blocking the secondary door's operation? It's a known defect of FSX that if the a/c is parked adjacent a fueling station, the secondary doors will be blocked by the oversized fuel trigger boundary...
 
Last edited:
On the other hand, upon reflection I have to wonder... are you absolutely sure that it was your first approach that was blocking the secondary door's operation? It's a known defect of FSX that if the a/c is parked adjacent a fueling station, the secondary doors will be blocked by the oversized fuel trigger boundary...

Well, most definitely not being blocked by a Fueling station, However..
The error was found to be NOT actually in the initially posted code here ..

After much more investigation and recompiling (as ya do!)
I have found the problem is actually in the following code that is used to ensure the spoilers remain deployed/stowed Dependant on the relative Vars..


Code:
<PartInfo>
    	<Name>BRS_FIRED</Name>
    	<Visibility>
     	 <Parameter>
        	<Code>
             (L:BRS_Handle, bool) 1 ==
             if{ (&gt;K:SPOILERS_ON) }
               	</Code>
      	</Parameter>
    	</Visibility>
</PartInfo>

<PartInfo>
    	<Name>BRS_SAFE</Name>
    	<Visibility>
     	 <Parameter>
        	<Code>
             (L:RBF_pin, bool) 0 ==
             if{ (&gt;K:SPOILERS_OFF) }
               	</Code>
      	</Parameter>
    	</Visibility>
</PartInfo>

I have now removed this code altogether, leaving the User with the responsibility of NOT stowing the Spoiler and Hence Cutting the chute free :)

I Still dont understand why the doors wouldn't operate if the BRS Safety Pin was still in "SAFE" mode though :)
 
I Still dont understand why the doors wouldn't operate if the BRS Safety Pin was still in "SAFE" mode though :)
Hi
Whats happening is a simvar or custom var is firing all the time in a loop, this prevents the fs sim from seeing multiple keystrokes like shft+E+2... instead it sees shft L:var L:var +E L:var L:var etc etc :) (can also cause a FPS hit)

You can use multiple keystrokes as a quick and dirty test if code is looping
if you have a 2nd exit canopy hit shft + E + 2 then just keep tapping the 2 the canopy/door will open and close on each press of the 2 key if there is no other var or keypress(assuming your not on a refuel node)
I use a program called event_logger.zip by Doug Dawson which is a gauge
that takes a lot of the guess work out of finding the offending code, as it will log into a text file all the polls to the sim var if the aircraft is just sitting still there will be virtually 0 polls if a var is misbehaving the log file will be full of the misfiring var
Wozza
 
As was stated, your script was being evaluated as often as 18 times per second, and every time it was executing the (>K:SPOILERS_OFF) command.

If you want to provide such a feature, then you need to also check the spoiler's position each cycle to determine whether the command needs to be sent:

Code:
<Code>
             (L:RBF_pin, bool) 0 ==
             (A:SPOILERS LEFT POSITION,percent) 0 >
             and
                  if{ >K:SPOILERS_OFF) }
</Code>
 
Back
Top