Animation of the magneto switch in FSX using FSDS 3.5
Results 1 to 15 of 15

Thread: Animation of the magneto switch in FSX using FSDS 3.5

Hybrid View

  1. #1
    SOH-CM-2024 Cees Donker's Avatar
    Join Date
    Jun 2005
    Location
    Zoetermeer, Netherlands
    Age
    68
    Posts
    4,640

    Animation of the magneto switch in FSX using FSDS 3.5

    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

  2. #2
    SOH-CM-2024 Cees Donker's Avatar
    Join Date
    Jun 2005
    Location
    Zoetermeer, Netherlands
    Age
    68
    Posts
    4,640
    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

  3. #3
    Quote Originally Posted by Cees Donker View Post
    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 (&gt;L:ignitionState,enum) }
    (M:Event) 'RightSingle' scmp 0 ==
    if{ (L:ignitionState,enum) ++ 1 min (&gt;L:ignitionState,enum) }
    (M:Event) 'WheelDown' scmp 0 ==
    if{ (L:ignitionState,enum) ++ 0 min (&gt;L:ignitionState,enum) }
    (M:Event) 'RightRelease' scmp 0 ==
    (L:ignitionState,enum) 1 ==
    and
    if{ 0 (&gt;L:ignitionState,enum) }
    (L:ignitionState,enum) -3 == if{ (&gt;K:MAGNETO_OFF) }
    (L:ignitionState,enum) -2 == if{ (&gt;K:MAGNETO_LEFT) }
    (L:ignitionState,enum) -1 == if{ (&gt;K:MAGNETO_RIGHT) }
    (L:ignitionState,enum) 0 == if{ (&gt;K:MAGNETO_BOTH) }
    (L:ignitionState,enum) 1 == if{ (&gt;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.

  4. #4
    SOH-CM-2024 Cees Donker's Avatar
    Join Date
    Jun 2005
    Location
    Zoetermeer, Netherlands
    Age
    68
    Posts
    4,640
    Thank you! That is very generous!

    Cees

  5. #5
    SOH-CM-2024 Cees Donker's Avatar
    Join Date
    Jun 2005
    Location
    Zoetermeer, Netherlands
    Age
    68
    Posts
    4,640

    second magneto switch in the same plane?

    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

  6. #6
    SOH Staff Tako_Kichi's Avatar
    Join Date
    Sep 2007
    Location
    SW Ontario, Canada (Ex-pat Brit)
    Age
    67
    Posts
    5,122
    Quote Originally Posted by Cees Donker View Post
    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


  7. #7
    Quote Originally Posted by Cees Donker View Post
    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
    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 (&gt;L:ignitionState,enum) }


    (M:Event) 'RightSingle' scmp 0 ==
    if{ (L:ignitionState,enum) ++ 1 min (&gt;L:ignitionState,enum) }


    (M:Event) 'WheelDown' scmp 0 ==
    if{ (L:ignitionState,enum) ++ 0 min (&gt;L:ignitionState,enum) }


    (M:Event) 'RightRelease' scmp 0 ==
    (L:ignitionState,enum) 1 ==
    and
    if{ 0 (&gt;L:ignitionState,enum) }


    (L:ignitionState,enum) -3 == if{ (&gt;K:MAGNETO_OFF) }
    (L:ignitionState,enum) -2 == if{ (&gt;K:MAGNETO_LEFT) }
    (L:ignitionState,enum) -1 == if{ (&gt;K:MAGNETO_RIGHT) }
    (L:ignitionState,enum) 0 == if{ (&gt;K:MAGNETO_BOTH) }
    (L:ignitionState,enum) 1 == if{ (&gt;K:MAGNETO_START) }
    </CallbackCode>
    </MouseRect>
    </PartInfo>

Members who have read this thread: 0

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •