Is anyone in this forum familiar with animations in FSDS 3.5? I'm trying to animate a magneto switch. It looks promising in FSDS, but is without movement in the sim. That means I must be doing something wrong!
Cees
Please Support the SOH "2023 Charter Membership Drive"
All online donations at this time are through PayPal
Snailmail donations can still be sent, see this thread
Please log in before making your donation.
Is anyone in this forum familiar with animations in FSDS 3.5? I'm trying to animate a magneto switch. It looks promising in FSDS, but is without movement in the sim. That means I must be doing something wrong!
Cees
Well, I got it animated (in part) but it is quirky! I tried to animate it in four stages: off- mag1- mag2- both, with three intervals. I used the 'switch_ignition_magnetos_trimotor' tag and animated at frs. 0, 25, 50 and 75. I used these rotations: -45, -15, 15 and 45. But! There is only movement between the frames 25 and 50 and it moves from the off-position to the both-position. So I have -off- off- both- both- instead of -off- mag1- mag2- both-. I've got the feeling that I'm missing something obvious, but I can't figure out what.
I sure hope someone here can help me!
Cees
I think your issue is the rotations you are using to position the switch. off should have the axis set to 0 for kf 0 after as you advance the kf your next value would be for instance 25 = 15 degrees , the for kf 50=30 degrees, kf 75 = 45 degrees. The actual values will depend on your texture map for the mag switch as you align your switch to the texture map.
here is the code we use for all our models that use a mag switch which rotates to the individual positions,it's key framed 0, 25, 50, 75, 100 off, left, right, both, start If you don't wish to use the start function leave off the kf 100
<Animation name="customMagSwitch" guid="a4b924b8-c430-4b09-92da-20acf7e728f4" length="100" type="Sim" typeParam2="customMagSwitch" typeParam="AutoPlay" />
<PartInfo>
<Name>customMagSwitch</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(L:ignitionState,enum) 3 + 0 max 4 min 25 *
</Code>
<Lag>200</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Ignition</TooltipText>
<MouseFlags>LeftSingle+RightSingle+RightRelease+Ri ghtDrag+WheelUp+WheelDown</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 ==
(M:Event) 'WheelUp' scmp 0 ==
or
if{ (L:ignitionState,enum) -- -3 max (>L:ignitionState,enum) }
(M:Event) 'RightSingle' scmp 0 ==
if{ (L:ignitionState,enum) ++ 1 min (>L:ignitionState,enum) }
(M:Event) 'WheelDown' scmp 0 ==
if{ (L:ignitionState,enum) ++ 0 min (>L:ignitionState,enum) }
(M:Event) 'RightRelease' scmp 0 ==
(L:ignitionState,enum) 1 ==
and
if{ 0 (>L:ignitionState,enum) }
(L:ignitionState,enum) -3 == if{ (>K:MAGNETO_OFF) }
(L:ignitionState,enum) -2 == if{ (>K:MAGNETO_LEFT) }
(L:ignitionState,enum) -1 == if{ (>K:MAGNETO_RIGHT) }
(L:ignitionState,enum) 0 == if{ (>K:MAGNETO_BOTH) }
(L:ignitionState,enum) 1 == if{ (>K:MAGNETO_START) }
</CallbackCode>
</MouseRect>
</PartInfo>
Add these entries to your modeldef.xml file. Make a back up before you do. If you would rather I can send you our entire file. We've developed quite a bit of custom code. PM me your email address.
Thank you! That is very generous!
Cees
Is it possible to put a second magneto switch in the same plane? I'm building a Fokker S.IV trainer with two panels, and I want to put a second magneto switch in the second cockpit. I've animated it, but it doesn't do anything.
Cees
I would just use the same code for the second magneto if you now have the first magneto working. You are only going to see/operate one magneto at a time in a tandem cockpit trainer and the sim only needs code for one. The fact that the rear magneto parts will move when you operate the front switch is moot as you won't see it and vice versa if you operate the rear one.
Larry
Using the same code for the second magneto didn't work.
Cees
Here's what we use. When placing duplicate animated controls, switches, levers in a second cockpit the trick is use a different name so that it can be activated uniquely from the part in the first cockpit otherwise it will animate when the first cockpit part is triggered
<Animation name="front_customMagSwitch" guid="538d46cf-9375-456b-a5ce-bfb7eb8b024e" length="100" type="Sim" typeParam2="front_customMagSwitch" typeParam="AutoPlay" />
<PartInfo>
<Name>front_customMagSwitch</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(L:ignitionState,enum) 3 + 0 max 4 min 25 *
</Code>
<Lag>200</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Ignition</TooltipText>
<MouseFlags>LeftSingle+RightSingle+RightRelease+Ri ghtDrag+WheelUp+WheelDown</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 ==
(M:Event) 'WheelUp' scmp 0 ==
or
if{ (L:ignitionState,enum) -- -3 max (>L:ignitionState,enum) }
(M:Event) 'RightSingle' scmp 0 ==
if{ (L:ignitionState,enum) ++ 1 min (>L:ignitionState,enum) }
(M:Event) 'WheelDown' scmp 0 ==
if{ (L:ignitionState,enum) ++ 0 min (>L:ignitionState,enum) }
(M:Event) 'RightRelease' scmp 0 ==
(L:ignitionState,enum) 1 ==
and
if{ 0 (>L:ignitionState,enum) }
(L:ignitionState,enum) -3 == if{ (>K:MAGNETO_OFF) }
(L:ignitionState,enum) -2 == if{ (>K:MAGNETO_LEFT) }
(L:ignitionState,enum) -1 == if{ (>K:MAGNETO_RIGHT) }
(L:ignitionState,enum) 0 == if{ (>K:MAGNETO_BOTH) }
(L:ignitionState,enum) 1 == if{ (>K:MAGNETO_START) }
</CallbackCode>
</MouseRect>
</PartInfo>
Thanks Paul! I have that code already in my modeldef! Just tested it. It works!
Cees
Glad someone was able to help with the switch!
I was trying to help with what little I know from FS9 stuff, but wasn't sure how the keyframe numbers worked for FSX.
The xml looks WAY different for parts when compared to gauge xml, though. At least what I've messed with in the past for FS9, that is.
Are all the values used for gauges also available for use in parts when it comes to FSX?
Is this something to do with FSDS or is there something else to look at? I've played around with GMAX for the M-2 and don't remember anything like this. I'm guessing it's only for FSX, correct?
Regards,
Jorge
Miami, FL
The XML syntax changed significantly between FSX and FS2004 and earlier. Some FS2004 code will work in FSX if it is written in the correct format but any early syntax XML (i.e. FS2000, FS2002, etc.) code will not. None of the FS2004 'canned' animation codes will work in FSX either, all animations have to be created individually and coded appropriately.
Larry
Thanks for the explination. I'm still fighting FSX to try and get it to work smoothly on my system, so not much flying with it yet.
Still, it's nice to have an idea of what can be parsed up to the thing in case I try my hand again at designing down the road again.
Now back to getting contact points and such straightened out.
Regards,
Jorge
Miami, FL
If it's info regarding the modeling of gear parts then check out post #53 in this thread by the great Milton Shupe: https://www.sim-outhouse.com/sohforu...-Modeler/page3
If it's the contact point data in the aircraft.cfg file then check out post #55 in the same thread.
That entire thread and all related video links are full of useful info.
Larry
Bookmarks