PDA

View Full Version : This is odd....



Piglet
January 1st, 2010, 22:37
Doing a little update on the AN-32's panel. Seems to be a bug in the ani codes. The prop sync switch is labelled "switch_prop_sync", and has the ani "switch_prop_sync" tagged to it. As one can see, a different label pops up. Rotors?!?
This isn't the first time I've seen this, but those times were mostly me goofing up a gauge XML. This involves the SDK written codes.
Now I know why many still love FS9...

Lionheart
January 1st, 2010, 22:39
Hey Tim,

I have had this happen when I accidentally tagged a part with a wrong animation, but oddly, you cannt change some, like they stick for some reason. I had to rebuild a new part and tag it.

Yes I agree on FS9..



Bill

Mathias
January 1st, 2010, 22:46
I would look up the code in modeldef and check the tooltipid.
There are a few bugs that are easily fixed such as the panel light switch bringing up panel lights plus position lights (or was is vice versa?).

EDIT: just looked it up and it seems to be ok.
Prbably they goofed the tooltipid itself so I would write a custom tooltip.
Could look like this:



<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>
<String>%((A:PROP SYNC ACTIVE, bool))
%{case}
%{:0}Prop Sync: Off
%{:1}Prop Sync: On
%{end}
</String>
</TooltipText>
</MouseRect>

Piglet
January 2nd, 2010, 15:40
LH
Hear ya on the "sticky ani's" Have had to remake many parts to get rid of persistant code. Seems to mostly affect door switches and fuel selectors on my system.
Mathias,
What's the fixed/corrected code for the panel light switch? That it also switches the nav lights on bugs me!

SkippyBing
January 2nd, 2010, 20:54
Piglet, if you search through modeldef.xml for the panel light code you'll see it has the key events for panel lights and nav lights, just delete the second one and it works properly. Bugged the hell out of me too!

TeaSea
January 3rd, 2010, 05:34
I think it's sexy when you guys talk code......


:jump:

sparouty
January 4th, 2010, 05:31
Hi everybody and happy new year!
I agree with SkippyBing, and to prevent me from hidden bugs in my VC, each time, I copy past the Modeldef.xml code that I need, and write my own animation/visibility/mouserec features...

Mathias, I tried to re-use your sample, but I did'nt succeed to make it works... Do you know if it works with custom L:Variable too?

regards
S.

Mathias
January 4th, 2010, 07:11
Oh, it's not a complete code, only point of interest is the part within the "TooltipText" entry which should replace the TooltipID part of the stock code.
And yes, it can be adopted to work with any variable.
Just right out of my head, you may need to write a callback code into the mouse rectangle

Mathias
January 4th, 2010, 07:51
For what it's worth, here's a complete and working example of a custom tooltip script in conjunction with an L:variable and a standard command


<PartInfo>
<Name>horizon_lock</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(L:HorizonLock, bool) 100 *
</Code>
<Lag>80</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>
<String>%((L:HorizonLock, bool))
%{case}
%{:0}Attitude Indicator Lock: unlocked
%{:1}Attitude Indicator Lock: locked
%{end}
</String>
</TooltipText>
<CallbackCode>
(L:HorizonLock, bool) ! (&gt;L:HorizonLock, bool)
(M:Event) 'LeftSingle' scmp 0 == if{ (&gt;K:ATTITUDE_CAGE_BUTTON) }
</CallbackCode>
</MouseRect>
</PartInfo>

Warrant
January 4th, 2010, 10:36
Thanks Piglet :salute:

sparouty
January 4th, 2010, 23:38
Hi
Thanks Mathias! I will test your code asap!
Regards,
S.

Mithrin
January 5th, 2010, 00:33
I love you guys, always trying to help out. This place isn't that rotten after all I guess.

Tim thanks for that An32 man, love it!