CallbackCode inside a MouseRect inside a PartInfo doesn't work

Version: 1.0.72.0

Frequency: Consistently

Severity: High

Context: Any aircraft using this type of code

Bug description:
In the following code I have in my aircraft:

<PartInfo>
	<Name>Throttle_Friction_Lever</Name>
	<AnimLength>100</AnimLength>
	<Animation>
		<Parameter>
			<Code>(L:Throttle_Friction_Lever, bool) 100 *</Code>
			<Lag>50</Lag>
		</Parameter>
	</Animation>
	<MouseRect>
		<Cursor>Hand</Cursor>
		<MouseFlags>LeftSingle+RightSingle</MouseFlags>
		<TooltipText>THROTTLE FRICTION</TooltipText>
		<CallbackCode>
			(L:Throttle_Friction_Lever, bool) ! (&gt;L:Throttle_Friction_Lever, bool)
		</CallbackCode>
	</MouseRect>
</PartInfo>

the CallbackCode actually does nothing

…additional comment on this: as far as I can remember this STOPPED working a couple of years ago in MSFS2020.
It worked in the initial release of MSFS2020, but stopped working after an update at a couple of years ago.
We moved all of our mouse areas to the Behavior section - and they work fine.

Actually it is perfectly working in the latest version of MSFS2020

Anyway I’ve already prepared a different version of the model behaviour to manage this animation in a modern way

Thanks for correcting me, and my most humble apologies for the inaccuracy - we moved away from the approach since it stopped working, and I am sure you are totally right.
But they definitely stopped working for us at a certain point, and we had to change all of our scripts.

No problem, every comment is useful

I was actually planning to replace it so now I had a good excuse

Hello @erasam

Some changes introduced with version 1.0.84.0 possibly fixed this problem.
Can you check your package again and let us know if anything has changed?

Regards,
Sylvain

Hi @FlyingRaccoon

the animation is now working properly again

You can close this ticket

1 Like